UserForm1.CommandButton1 = "From" uses UserForm1.Textbox1
UserForm1.CommandButton2 = "To" uses UserForm1.Textbox2
Public strDate
Step 1) Click on UserForm1.CommandButton1 to show the calendar form
Code: Select all
Sub CommandButton1()
CalendarForm.Show
UserForm1.Textbox1 = strDate 'This is where the challenge is with passing the variable
End Sub
Code: Select all
'declare a variable strDate
strDate = DateClicked
Unload CalendarForm
John