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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

disabling macro warning message OR creating a check function 1

Status
Not open for further replies.

thumper808

Technical User
Apr 22, 2001
26
CA
Hi all you Excel gurus,
I have a workbook, in Excel 2003, that I would like to either automatically open with macros enabled (yeah, I know...hackers dream and all) OR to create a vba function to do a check or validation to see if macros are enabled (which, I'm guessing, is pretty hard to enforce since it's a macro!...right?). I assure you that this is for professional use only. Any suggestions would be greatly appreciated. Thank you in advance.
 
Not going to fly, because if they have disabled macros then your code won't even be able to run to check in the first place. Usual reason for something like this is to stop them working with the workbook if macros have been disabled, in which case you would normally put in a helper sheet with a message on it telling them that they must have macros enabled, then programmatically hide everything else, perhaps using xlveryhidden, and have an open event that hides the warning and displays the rest. If macros are enabled then all is well and good, but if disabled then they get the warning message. You do need to incorporate a close event that hides everything but the warning though, to ensure it is OK next time they open it.

Regards
Ken................

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Ken, that is the best solution I've heard all day. I will do exactly as you have suggested. Yet again, Tek-Tips has not let me down. Thank you very much for your reply.

Take care,
Thumper808
 
Not sure if you need it, but ken wrote a more detailed answer in the excel newsgroup. Here is a link to his post explaining how to actually do this.


Paul D
[pimp] pimpin' aint easy
 
You could always use your own security certificate - that's what I've done for a workbook I've just developed.

----------------------------
Cogito Ergo Sum [jester2]
----------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top