Suppress Excel Macro dialog from Access

Posted on 2006-03-28
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
    LVL 1

    Accepted Solution

    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

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
    In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

    761 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now