Private Sub form_click() Dim n As Integer n = InputBox("请输入:") If n < 1 Or n > 7 Then MsgBox ("输入的数必须在1-7之间") End If Print choose(n)End SubFunction choose(m As Integer) choose = WeekdayName(m)End Function