Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling the Excel Macro Warning

Status
Not open for further replies.

meintsi

Technical User
Jul 22, 2002
181
US

Is there a way to disable the Enable/Disable Macros dialog box from appearing for certain workbooks only?

Because company policy dictates that the security setting be set for this warning dialog box appear as a reminder, (With some users, it's just safer this way), is there a way to disable this warning box for a personal workbook I've constructed with several macros and VB controls?

I use this workbook daily and personally find it annoying to have to "Enable Macros" everytime I open my own workbook.

I would think the code would have to be placed in the workbook open event where I already have existing code to hide many of the additional worksheets until there are needed to be shown.

Thx in advance.... *Remember.......
If you don't use your head,
your going to have to use your feet.
 
Can't do it in code - think about it - if you could, there would be no point having the security 'cos anyone could write a nasty little virus that would bypass your security Rgds
Geoff

Vah! Denuone Latine loquebar? Me ineptum. Interdum modo elabitur
 
Figured that was the answer but HAD to ask. (Hoping, praying, et.al.) *Remember.......
If you don't use your head,
your going to have to use your feet.
 
There are possible (dodgy) solutions to this. If you open the workbook automatically when xl starts then you don't get the message eg personal.xls

Put 2 & 2 together and make 5 with this info but I'm not going to spell it out here!!

;-) If a man says something and there are no women there to hear him, is he still wrong? [ponder]
 
If you work with office 2k/xp you can use digital signature to avoid the macro warning.

To create the signature, find file 'selfcert.exe' somewhere in Program Files>Microsoft Office>Office10 (for XP). Run it and follow the dialog window.

To assign signature to the project, go to VB Editor, and when highlighted project in Project explorer, go Tools>Digital signature..., select created signature.

When someone opens the workbook a warning dialog is displayed, but the user now can select option to trust the signature. If so, no more macro warning will be displayed if any office document will be signed using that signature.
The trusted macro source will be accepted for all office projects.

The document's signature will be rejected only if VBA project is changed, no changes in document cause rejection.
To avoid accidental project viewing (and rejecting signature), it is good to protect it with simple password.
 
Loomah....interesting......never thought about that before......I'm tempted to give you a star for the idea but I'm not sure it's actually usable - except on a personal basis where companies won't allow the settings to be changed.... Rgds
Geoff

Vah! Denuone Latine loquebar? Me ineptum. Interdum modo elabitur
 
Ta xlbo
The place to think about using is the "Alternate Startup File Location" But be careful as xl will open anything that's in the folder you assign.

I once thought about setting up a private network folder to contain personal.xls so that I could pick it up no matter where I was working. Not sure if the folder location is stored in .xlb or something though. And it would depend on your network as to whether this would work.

Not a relevant point at the moment anyway as I'm not working in that kind of job at the mo. Tho where I am is great if, like a mate of mine, you're a plane spotter or if you like lots of tanks & police etc.

;-) If a man says something and there are no women there to hear him, is he still wrong? [ponder]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top