Suppress Excel Macro dialog from Access

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.
Who is Participating?
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.
LenkaLAuthor Commented:
Well, also we can programmatically through VBA put the Macro security to low.
What is the code for this?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.