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

Detecting Macros Enabled?

Status
Not open for further replies.

shadyness

MIS
Dec 21, 2001
89
US
I am finishing up a VB User Form in Excel, and If the user chooses to Disable Macros, I want the application to close or be unable to open rather. I have been looking through all of my resources, but everything is just about the harmful possibilities of code. Is this detection possible?

Thanks --
Ian
<== Some people say they are afraid of heights. With me its table widths. ==>
 
One approach sometimes used is to have all but one worksheet in your application be &quot;very hidden&quot;. The remaining worksheet would have a message stating that the application can only work if macros are enabled, and nothing more. The workbook_open event would unhide the appropriate sheets, hide the message worksheet, and continue on its way. If the workbook_open event never runs, the user never gets to the relevant parts of the application. Then password-protect the VBA project. Not waterproof, but pretty good protection.
Rob
[flowerface]
 
thanks. I am in the middle of doing just that right now! great minds think alike I suppose ;)

Thanks--- <== Some people say they are afraid of heights. With me its table widths. ==>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top