Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is there an ActiveForm command?
I need the calendar to update the TextBox
I think that's the wrong approach. You should have the calling form update itself. -- Jim "Trevor Williams" wrote in message ... |I have 2 forms. Both forms have a button that calls a calendar control. | | The calendar Close Event is set to update a TextBox on UserForm 1 - which is | fine if UserForm1 is open. | | I need the calendar to update the TextBox on the form that is currently | open. Is there a function like 'ActiveForm' that I can use? | | Thanks | | Trevor Williams |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is there an ActiveForm command?
frmCalendar should have a public variable that it puts the user's choice in.
After the user is done with the calendar and clicks OK or Cancel you should hide (not unload) it. Control will return to the calling userform. It can then get the value from the public variable: userChoice = frmCalendar.ReturnVariable -- Jim "Trevor Williams" wrote in message ... | Hi Jim | | Not sure I know what you mean? | | I need the calendar control to update a textbox on either UserForm1 or | UserForm2, depending which one the control was triggered from. | | Currently the code specifies UserForm1 (frmOrderForm): | | Private Sub Calendar1_Click() | frmOrderForm.TextBox10.Value = Format(Calendar1.Value, "dd/mm/yyyy") | End Sub | | I'm looking to do someting along the lines of ActiveForm.TextBox10.Value... | but ActiveForm is not an option. | | Trevor | | | "Jim Rech" wrote: | | I need the calendar to update the TextBox | | I think that's the wrong approach. You should have the calling form update | itself. | | -- | Jim | "Trevor Williams" wrote in | message ... | |I have 2 forms. Both forms have a button that calls a calendar control. | | | | The calendar Close Event is set to update a TextBox on UserForm 1 - which | is | | fine if UserForm1 is open. | | | | I need the calendar to update the TextBox on the form that is currently | | open. Is there a function like 'ActiveForm' that I can use? | | | | Thanks | | | | Trevor Williams | | | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
One command in one cell initiating another command in another cel. | Excel Worksheet Functions | |||
command code ( GOTO command) in formula | New Users to Excel | |||
Pivot Table Error Message - "Command Text not set for command obje | Excel Discussion (Misc queries) | |||
Excel to load COMMAND and type a Run Command? | Excel Programming | |||
activeform | Excel Programming |