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. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,537
    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?

  3. #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.

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,537
    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
  •