[填空题] 简述下列程序的功能:______。 Sub Form_Load()Dim d As Date d=Now Weekx=Weekday(d) Weeky=WeekdayName(We

16 查阅

[填空题] 简述下列程序的功能:______。

Sub Form_Load()

Dim d As Date

d=Now

Weekx=Weekday(d)

Weeky=WeekdayName(Weekx)

If Weekx=1 Or Weekx=7Then

Debug.Print"今天是:"; Weeky

Debug.Print"今天是休息日!"

Else

Debug.Print"今天是:"; Weeky

Debug.Print"今天是工作日!"

End If

End Sub

参考答案:

在立即窗口显示当天是星期几,并提示当天是工作日还是休息日。

计算机考试