Private Sub Command1_Click() Dim i As Integer, A As Integer, B As Integer, C As String A = InputBox("请输入年份", "某年每个月的第一天是星期几") Form1.Cls For i = 1 To 12 C = A & "-" & i & "-1" B = Weekday(C) Select Case B Case vbSunday Print A & "年" & i & "月1日是 星期日" Case vbMonday Print A & "年" & i & "月1日是 星期一" Case vbTuesday Print A & "年" & i & "月1日是 星期二" Case vbWednesday Print A & "年" & i & "月1日是 星期三" Case vbThursday Print A & "年" & i & "月1日是 星期四" Case vbFriday Print A & "年" & i & "月1日是 星期五" Case vbSaturday Print A & "年" & i & "月1日是 星期六" End Select Next i End Sub |
|站长邮箱|小黑屋|手机版|Office中国/Access中国
( 粤ICP备10043721号-1 )
GMT+8, 2025-4-4 18:38 , Processed in 0.208590 second(s), 17 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.