jrobin5881
Technical User
Good Morning,
I have a pop up calendar that appears when an image is clicked on the user form.
and this is working correctly. I want the date that the user selects to be transferred to a text box control that I have next to the calendar image on the user form. I named my text box txtDate and when I test my code I get the following error message, " Compile error: Variable not defined" which I don't understand why this occurs?
Here's my code
should I first pass the value to variable and then pick up the value in my text box???
I have a pop up calendar that appears when an image is clicked on the user form.
Code:
Private Sub Image1_Click()
frmCalendar.Show
End Sub
and this is working correctly. I want the date that the user selects to be transferred to a text box control that I have next to the calendar image on the user form. I named my text box txtDate and when I test my code I get the following error message, " Compile error: Variable not defined" which I don't understand why this occurs?
Here's my code
Code:
[COLOR=red yellow]Private Sub Calendar1_Click()[/color red yellow]
' Transfer date selected on calendar to active cell
' and close UserForm.
[COLOR=red yellow]txtDate.Value[/color red yellow] = Calendar1.Value
Unload Me
End Sub
should I first pass the value to variable and then pick up the value in my text box???