Dim TGl As Date
Dim tglLhr, blnLhr As Integer
Private Sub Command1_Click()
TGl = Me.DTPicker1.Value
tglLhr = Day(TGl)
blnLhr = Month(TGl)
If (tglLhr >= 22 And blnLhr = 12) Or (tglLhr <= 20 And blnLhr = 1) Then
zodiak = "Capricorn"
ElseIf (tglLhr >= 21 And blnLhr = 1) Or (tglLhr <= 19 And blnLhr = 2) Then
zodiak = "Aquarius"
ElseIf (tglLhr >= 20 And blnLhr = 2) Or (tglLhr <= 20 And blnLhr = 3) Then
zodiak = "Pisces"
ElseIf (tglLhr >= 21 And blnLhr = 3) Or (tglLhr <= 19 And blnLhr = 4) Then
zodiak = "Aries"
ElseIf (tglLhr >= 20 And blnLhr = 4) Or (tglLhr <= 20 And blnLhr = 5) Then
zodiak = "Taurus"
ElseIf (tglLhr >= 21 And blnLhr = 5) Or (tglLhr <= 21 And blnLhr = 6) Then
zodiak = "Gemini"
ElseIf (tglLhr >= 22 And blnLhr = 6) Or (tglLhr <= 22 And blnLhr = 7) Then
zodiak = "Cancer"
ElseIf (tglLhr >= 23 And blnLhr = 7) Or (tglLhr <= 23 And blnLhr = 8) Then
zodiak = "Leo"
ElseIf (tglLhr >= 24 And blnLhr = 8) Or (tglLhr <= 22 And blnLhr = 9) Then
zodiak = "Virgo"
ElseIf (tglLhr >= 23 And blnLhr = 9) Or (tglLhr <= 23 And blnLhr = 10) Then
zodiak = "Libra"
ElseIf (tglLhr >= 24 And blnLhr = 10) Or (tglLhr <= 22 And blnLhr = 11) Then
zodiak = "Scorpio"
ElseIf (tglLhr >= 23 And blnLhr = 11) Or (tglLhr <= 21 And blnLhr = 12) Then
zodiak = "Sagitarius"
End If
Me.Text2.Text = zodiak
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Post a Comment