I have searched the forum and couldn't find an answer to this. I am trying to fill in dates in text boxes on a userform. I have two text boxes and a monthview control. I only want the monthview control to be visible after a textbox is entered. After a date is selected, it should fill the text box in with the selected date and then the monthview control should be invisible until one of the text boxes is entered. Filling the text boxes and hiding the monthview control works fine. The problem is after the monthview is no longer visible, the general_date_pick.visible = True line doesn't work anymore.
Any ideas? Code below:
Private Sub start_date_Enter()
current_box = "start_date"
general_date_pick.Visible = True
End Sub
Private Sub end_date_Enter()
current_box = "end_date"
general_date_pick.Visible = True
End Sub
Private Sub general_date_pick_DateClick(ByVal DateClicked As Date)
Controls(current_box).Value = DateClicked
general_date_pick.Visible = False
End Sub
Bookmarks