Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    May 2014
    Location
    Gainesville, GA
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question One Macro to Run Multiple Macros

    Good afternoon!

    I have created one macro to run multiple macros (This is to send emails) however when I run my "RunAll" macro I have to click "Allow" in order for it to run for each one.


    Here is my code.

    Option Compare Database

    '------------------------------------------------------------
    ' RunAll
    '
    '------------------------------------------------------------
    Function RunAll()
    On Error GoTo RunAll_Err

    DoCmd.RunMacro "MacroBill", , ""
    DoCmd.RunMacro "MacroJessica", , ""
    DoCmd.RunMacro "MacroJaneDoe", , ""


    RunAll_Exit:
    Exit Function

    RunAll_Err:
    MsgBox Error$
    Resume RunAll_Exit

    End Function





    How do I get this to run without having to click "Allow" for each one?

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,535
    Thanks
    0
    Thanked 23 Times in 23 Posts
    Does DoCmd.SetWarnings False prior to the DoCmds help, same as VBA, and DoCmd.SetWarnings after the DoCmds?

  4. #3
    New Lounger
    Join Date
    May 2014
    Location
    Gainesville, GA
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I set the warnings to "No" but it didn't work.

  5. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,535
    Thanks
    0
    Thanked 23 Times in 23 Posts
    I have never used macros only VBA so I am no help here, try googling it.
    However that looks like VBA code you have there, if so try:

    DoCmd.SetWarnings False
    DoCmd.RunMacro "MacroBill", , ""
    DoCmd.RunMacro "MacroJessica", , ""
    DoCmd.RunMacro "MacroJaneDoe", , ""
    DoCmd.SetWarnings True
    Last edited by patt; 2014-06-06 at 17:52.

Posting Permissions

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