Variable macro security when opening files

  • I understand about macro security settings and I have mine set to "Medium", so when I open a workbook I should be asked whether I want macros enabled or not.

    However, this only happens when I open a file from Explorer or from the recently-used list under File (in Excel itself). If I use File, Open and browse for the file, Excel opens it and enables macros without asking, but ignores any Auto_Open macro.

    I used to think that this was a quirk of my PC, but I have since noticed that the same thing happens for a lot of my colleagues. The worry is that some of my most widely-used workbooks rely on an Auto_Open macro to set various values and protect worksheets, etc.

    Has anybody come across this and is there a way of ensuring the Auto_Open macros run?


  • Bill, I'm not sure which version of Excel you're using, but there are "signed macros" and I believe, in XP, there is a switch to allow those to be run, etc. Quite possibly, your macro security doesn't allow an auto-open to run, but the signature being "ok" does allow it. I'm not sure. Just guessing. If you're on XP, go to Tools-Macro-Security. See the Trusted Sources tab. So, if the codes were written internally, they may be seen as trusted sources?

  • Try switching your Auto_Open procedures to a Workbook_Open module and see if you get the same results. I am running Win98 w/Office 2000 at home and I set up two workbooks both with Auto_Open and Workbook_Open procedures and set my Macro Security to Medium. I tried opening the books just as you posted and I was prompted to enable each time. May have to do some more digging to find out what is going on behind the scenes.

    Please post back your OS and Excel Version to help in searching out possible solutions.


  • Bruce and Dreamboat,

    Thanks for the comments. OS is Windows 2000 Ver 5.0 (SP1) running on company network and Excel is 2000 (9.0 SR-1). (I also have Excel 97 installed, but it does not exhibit the same problem)

    I have checked various workbooks and if the code is in a Workbook_Open module instead of an Auto_Open procedure it DOES run in every case - so that's an improvement! (Excel still doesn't ask if I want macros enabled, but that's not too much of a big deal.) So I have a bit or re-coding to do now!

    We have a redundant document management system in the company that had an excel add-in, the certificate for which has expired. I can't see why that would cause this problem, but I'm checking that.

    Thanks again.


  • Just to let you know that I have now deleted all traces of the old redundant document management system from my PC and....guess what? No more Auto_Open macro problems.

    Thanks again for the helpful comments. Hopefully this experience may be of assistance to somebody.(??!!)


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!