Private Sub Command1_Click()
FirstDate = (TxtFDate.Value)
txtFD.Value = Day(FirstDate)
TxtFM.Value = Month(FirstDate)
TxtFY.Value = Year(FirstDate)
'MsgBox (FirstDate)
SecondDate = (TxtSDate.Value)
TxtSD.Value = Day(SecondDate)
TxtSM.Value = Month(SecondDate)
TxtSY.Value = Year(SecondDate)
'MsgBox (SecondDate)
If FirstDate > SecondDate Then
MsgBox ("Please enter a secound date thatis grater than the first date")
Else
Do
Calendar0.SetHighLightDay TxtFY.Value, TxtFM.Value, txtFD.Value, RGB(255, 0, 0)
FirstDate = FirstDate + 1
txtFD.Value = Day(FirstDate)
TxtFM.Value = Month(FirstDate)
TxtFY.Value = Year(FirstDate)
Loop Until FirstDate = SecondDate + 1
End If
'FirstDate = FirstDate + 1
'MsgBox (FirstDate)
End Sub
'Calendar0.SetHighLightDay txtHYear.Value, txtHMonth.Value, txtHDay.Value, RGB(255, 0, 0)
'End Sub