Consulting

Results 1 to 4 of 4

Thread: Sleeper: Running Multiple Macros from a command button

  1. #1

    Unhappy Sleeper: Running Multiple Macros from a command button

    Hi
    I have a command button and a whole bunch of macros. Rather than having one button for each macro I'd like to have just one button for all the macros.

    I've tried putting multiple "Run" commands into the On-click event e.g
    Run ("Macro1")
    Run ("Macro2")
    Run ("Macro3")
    but only the first run command executes.

    Can anyone suggest any way around this.

    Many Thanks
    J

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Well in the on click event you can call or run as many macros as you want.


    Call macro1
    Call macro2
    ]
    Or

    Application.Run "Macro1"
    Application.Run "Macro2"

  3. #3
    OR you can create a driver macro that contains a call to each of the other macros:
    Sub CallMacs()
    Call Macro1
    Call Macro2
    ...
    End Sub
    which is essentially what DRJ just suggested.

  4. #4
    VBAX Regular Erays's Avatar
    Joined
    Mar 2005
    Posts
    73
    Location
    What macros do you wish to run please post them

Posting Permissions

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