VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3090
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim a%(12)
Rem 求月代码
Private Sub Form_Load()
  a(1) = 0             '保存1月份的月代码
  For m = 1 To 11
    Select Case m      '求各月天数
      Case 2
        n = 28
      Case 4, 6, 9, 11
        n = 30
      Case 1, 3, 5, 7, 8, 10, 12
        n = 31
    End Select
    k = m + 1                '月代码在数组中的存放位置
    a(k) = (a(m) + n) Mod 7  '计算并保存月代码
  Next m
End Sub
Rem 显示月代码
Private Sub Form_Activate()
   For k = 1 To 12
     Print a(k);
   Next k
End Sub
