[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Suppress Excel Macro dialog from Access

Posted on 2006-03-28
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.
Question by:LenkaL

Accepted Solution

sbarrow1 earned 300 total points
ID: 16316030
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.

Author Comment

ID: 16322867
Well, also we can programmatically through VBA put the Macro security to low.
What is the code for this?

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question