Private Sub Command1_Click()
Dim year As Integer
Dim month As Integer
Dim day As Integer
Dim dayofweek As Integer
Dim birthday As Date
year = Int(Val(Text1.Text))
month = Int(Val(Text2.Text))
day = Int(Val(Text3.Text))
birthday = DateSerial(year, month, day)
dayofweek = Weekday(birthday)
Label6.Caption = WeekdayName(dayofweek)
End Sub