+ Reply to Thread
Results 1 to 4 of 4

Single Macro for Multiple Userforms

  1. #1
    Registered User
    Join Date
    05-30-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    31

    Single Macro for Multiple Userforms

    Dear All

    I have searched for this topic in this forum but have been unable to find this, hence the reason to ask for help

    I have a few multipage userforms i.e. userform1, userform2, userform3. Each userform has a clear button. Currently i have plugged in the code below in each clear button for all userforms

    Please Login or Register  to view this content.

    I am hoping to create a macro in which a code similar to above is used (to include all useforms) that can be called for 'clear' buttons for each userform to do the same job. I will really appreciate some guidance on how this can be done.

    Thanks

    Ali

  2. #2
    Forum Contributor vikas.bhandari's Avatar
    Join Date
    04-07-2006
    Location
    Delhi, India
    MS-Off Ver
    Office 2007 and 2010
    Posts
    303

    Re: Single Macro for Multiple Userforms

    Added the following Macro to the module.

    Please Login or Register  to view this content.

    And the following code to call that macro at the form you are calling from:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Single Macro for Multiple Userforms

    rI use a Public Function in a standard module


    Please Login or Register  to view this content.

    To clear the form something like

    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 07-09-2012 at 10:20 AM. Reason: typo
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    05-30-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Single Macro for Multiple Userforms

    Hi Both

    Many thanks for your assistance...codes worked perfectly

    Appreciated

    Ali

+ 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