Accessing Form's Values from Invoking Sub
Writing my first ever VBA macro. My macro needs to access the value which
the user typed into a text box on a form. UserInput.Show MsgBox "max value is " + UserInput.tbxMax.Text The resulting message box shows that UserInput.tbxMax.Text returned a null (or maybe blank) value but I certainly did type something into the text box! The form's OK button's code just does an Unload Me. Is that the problem. Are the control's values lost because of the Unload? If so what should I have done to remove the display of the form and return control to the invoking sub but still retain the user entered values? I don't know that what I tried should have worked, but it all made sense based on my VB.Net experience. Thanks, Bob |
All times are GMT +1. The time now is 06:39 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com