Hi there,
I am trying to enhance an existing userform to help the users select a date from a Calendar to those textboxes where a date entry is required.
Calendar control is not present on the versions of xl we are using at my company.
I thought I will be using one of the earlier developments I have found here at this Forum, which is a DatePicker Userform that was written by one of you guys many years ago and ever since I am using that UF for good.
So, I have the main UF (called ProblemSolvingForm) and there is a CommandButton that launches that DatePicker little userform called UFCalendarOnUf.
Now, what it needs to do is:
1. should stay always on the front, and the User should be able to pull it to various spots on top of the main UF to have access to all texboxes where Date entry would be required.
2. when the User sets the focus on a particular TextBox on ProblemSolvingForm, then activates the Calendar UF, the date that is selected there should be entered into the texbox having received the focus on the main UF earlier.
I'm at the beginning of patching the components together, and getting error messages when below code is run:
Would appreciate any guidance.![]()
Private Sub DateIn(MyDt As Date) With ProblemSolvingForm If .ActiveControl.TypeName = "TextBox" Then .ActiveControl = MyDt End If End With End Sub
Bookmarks