+ Reply to Thread
Results 1 to 4 of 4

!! this is a nightmare need help

  1. #1
    Forum Contributor
    Join Date
    12-16-2006
    Posts
    349

    Unhappy !! this is a nightmare need help

    I currently operate 100+ excel spreadsheets each spreadsheet has a macro into to run when the workbook opens and when the workbook close.

    I then have a seperate mointioring file which monitors the 100+files, and in this file I have a macro which opens all the files and closes them for updating purposes

    My problem is I dont want the workbook open and workbook close macro to work if I am running the update macro!

    Make any sense ? Please help

  2. #2
    Registered User
    Join Date
    12-21-2006
    Posts
    27
    Hmmm, one way I would look to do it is to do something with the security levels. I looked in VB and it appears you can only change the security down to low, I didnt find an option to set it on high.

    If you could perhaps set the update macro as a trusted publisher, but workbook open and close ones as untrusted, then they wouldnt run if you selected a high security level. As your update macro was trusted it would run under this setting and so would have the desired effect? Just a thought, I dont know any other way to disable workbook open and close macros without just denying them the security.

    Michael.

  3. #3
    Forum Contributor
    Join Date
    12-16-2006
    Posts
    349

    need more help

    how would I do that ? Ive never set security levels

  4. #4
    Registered User
    Join Date
    12-21-2006
    Posts
    27
    Under tools -> Macro -> Security you can set the levels, I am unsure of setting trusted publishers or anything though as I have never done it either.

    The line in VB Application.AutomationSecurity = msoAutomationSecurityLow sets the security to low, and there is another line Application.AutomationSecurity = msoAutomationSecurityByUI which sets it back.

    If you had security on high as default, but it let you run your update macros, you could include these lines after each spreadsheet is open and before it is closed to only allow macros to run once it is opened, hence removing the autoopen and autoclose macros. I think it would work, as I have said I have never done it.

    Michael.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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