Return values from UserForms
I open an input form when the sheet is opened.
How can I get a return value from a UserForm, so I can close the form and cancel the action if the Cancel Button is pressed, and I return to the spreadsheet, as opposed to accepting the input, printing it, saving it and closing it if they press OK. TIA |
Return values from UserForms
You don't.
Put a public variable in the general module, and have the cancel button set the value of that variable so you can check it in your code. -- Regards, Tom Ogilvy "Graham Y" wrote in message ... I open an input form when the sheet is opened. How can I get a return value from a UserForm, so I can close the form and cancel the action if the Cancel Button is pressed, and I return to the spreadsheet, as opposed to accepting the input, printing it, saving it and closing it if they press OK. TIA |
Return values from UserForms
Thanks Tom
"Tom Ogilvy" wrote: You don't. Put a public variable in the general module, and have the cancel button set the value of that variable so you can check it in your code. -- Regards, Tom Ogilvy "Graham Y" wrote in message ... I open an input form when the sheet is opened. How can I get a return value from a UserForm, so I can close the form and cancel the action if the Cancel Button is pressed, and I return to the spreadsheet, as opposed to accepting the input, printing it, saving it and closing it if they press OK. TIA |
All times are GMT +1. The time now is 03:13 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com