We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Suppress Excel Macro dialog from Access

LenkaL asked
Medium Priority
Last Modified: 2012-05-05
I'm running this line of VBA code in Access:

Call ExecCmd("excel.exe " & """" & FilePath & FileName& """")

it works fine, but presents me with Enable Macros dialog for Excel file.

Since I want to automate it and not to have  user interaction, I need a VBA
code in Access to suppress that dialog. I can't put the Macro security to low in this instance.
Watch Question

Use automation sand run the macro code from within the access database.  That is declare an excel objcet and use it to open the workbook, get rid of the macros from the workbook and do all the work from access.  Or get the macros in the excel workbook a certificate so the macro warning won't show.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


Well, also we can programmatically through VBA put the Macro security to low.
What is the code for this?
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.