Private Sub Command1_Click()
Dim year As Integer
Dim month As Integer
Dim day As Integer
Dim birthday As Date
Dim date of week As Byte
Year = Int (Val(Text1.Text))
mont = Int (Val(Text2.Text))
day = Int(Val(Text3.Text))
birthday = DateSerial(year, month, day)
dateofweek = Weekday(birthday)
Label5.Caption = WeekdayName(dateofweek)
End Sub
Function myweekdayname(dayofweek As Byte)As String
Select Case dayofweek
case1: my WeekdayName = "星期天"
Else
myweekdayname = "非星期天"
End Select
End Function