Hi, I have created a userform but now I want to create a macro so when you click on (e.g.a button) it will open the user form, just for ease of use really. Can anyone help.
Hi, I have created a userform but now I want to create a macro so when you click on (e.g.a button) it will open the user form, just for ease of use really. Can anyone help.
In your Visual Basic editor, add a standard code module (if you don't already have one in your project) and insert the following code:
Substitute "MyNewForm" for the name of your UserForm. Then add a Forms (not ActiveX) Control CommandButton to whichever worksheet from which you wish to launch the form. Right click on the button and select Assign Macro from the context menu. A dialog box should appear with a list of any public macros you may have in your open workbooks. Select Show_My_Form. You should be good to go!![]()
Please Login or Register to view this content.
Thanks,
Ryan
A word to the wise is infuriating. - Hunter S Thompson
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks