av8tordude
01-09-2009, 08:17 PM
I have two userforms that I want to call the calendar control. Currently I have a calendar control for each userform. Is it possible to have only 1-calendar control being used by 2-userformsl?
Private Sub Calendar1_Click()
frmLogbook.txtDate = Calendar1.Value
frmFlt.txtDate = Calendar1.Value
Unload Me
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
Calendar1.Value = DateValue(frmLogbook.txtDate.Value)
Calendar1.Value = DateValue(frmFlt.txtDate.Value)
End Sub
Private Sub Calendar1_Click()
frmLogbook.txtDate = Calendar1.Value
frmFlt.txtDate = Calendar1.Value
Unload Me
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
Calendar1.Value = DateValue(frmLogbook.txtDate.Value)
Calendar1.Value = DateValue(frmFlt.txtDate.Value)
End Sub