+ Reply to Thread
Results 1 to 2 of 2

Userform Macro query

  1. #1
    Registered User
    Join Date
    05-21-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Userform Macro query

    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.

  2. #2
    Registered User
    Join Date
    05-20-2010
    Location
    Fresno, CA
    MS-Off Ver
    2003, 2010
    Posts
    58

    Re: Userform Macro query

    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:

    Please Login or Register  to view this content.
    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!
    Thanks,
    Ryan



    A word to the wise is infuriating. - Hunter S Thompson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1