cedop
asked on
passing data from one userform to another
Hi,
I have 2 userforms in an excel macro, in the first one there is a text field and button near it. when the button is pressed, a second userform opens. On the second userform, there is the calander control with an ok button. when a date is selected, and the ok butotn is pressed, I want the second userform to be dismissed, and the date entered into the text field on the first userform with the format dd/mm/yyyy - not including the hours and mins. or whatever goes by default. I also need to reference that date inside the macro in another function within the first userform.
can someone explain how variables are passed along in vba?
thanks in advance
I have 2 userforms in an excel macro, in the first one there is a text field and button near it. when the button is pressed, a second userform opens. On the second userform, there is the calander control with an ok button. when a date is selected, and the ok butotn is pressed, I want the second userform to be dismissed, and the date entered into the text field on the first userform with the format dd/mm/yyyy - not including the hours and mins. or whatever goes by default. I also need to reference that date inside the macro in another function within the first userform.
can someone explain how variables are passed along in vba?
thanks in advance
ASKER
where do i put this
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
set the variable when your second form unload
ie
Private Sub UserForm_QueryClose(Cancel
d = "your date form string"
End Sub