+ Reply to Thread
Results 1 to 3 of 3

How to enable macros when a file is opened from another macro

  1. #1
    Registered User
    Join Date
    07-17-2007
    Location
    Buenos Aires
    Posts
    12

    How to enable macros when a file is opened from another macro

    Hi,
    This SUB in excel 2007 must open a file containing macros (so it's an .xlsm file).

    The file is opened, but oftenly macros are not automatically enabled. Sometimes excel shows the traditional Warning message asking if I'd like to enable macros, but many times it doesn't. So in those cases I need to go to the opened file and click the Options button to manually enable macros. This is against the automatization process I'm trying to implement, as the amount of files I need to open is high.

    Could anybody suggest how to always automatically enable macros of the file to be opened?

    Please Login or Register  to view this content.
    Last edited by aspicuelta; 06-10-2011 at 12:35 PM.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: How to enable macros when a file is opened from another macro

    Macros should be automatically enabled if you open a workbook in code unless you have explicitly changed the application.automationsecurity property in your code and forgotten to reset it.
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    07-17-2007
    Location
    Buenos Aires
    Posts
    12

    Re: How to enable macros when a file is opened from another macro

    Hi,

    I have no code explicity changing the Application.AutomationSecurity property, but now I added this portion of code that runs when the master file (the one containing the macro that opens other files) is opened, and it worked OK.
    It means, security level is set to Low when the master file is opened, and then the macros of the auxiliar file are automatically enabled once it is opened.
    Many thanks for your comment.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1