Checking if macros are enabled or disabled

flashsam

Board Regular
Joined
Nov 13, 2003
Messages
59
Hello,

I'm hoping someone can help me out here. I know that the other day i came across a question that someone had asked about forcing the user to choose 'enable macros' and that unless you're security settings are low then it's not possible.

I know that someone gave an alternative which was an auto_open macro that checked if the macros were active or not and if they were disabled then it gave you a message and then closed the file.

I've searched and i can't find it. If anyone knows where it is please let me know. I'd be most grateful.

Thanks,
Sam
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
If macros are disabled, how can a macro check if macros are disabled?

The easy way to do this is to have a worksheet that says "Hey, bozo, enable macros if you know what's good for you." If macros are enabled, the Workbook_Open routine hides the 'bozo, enable macros' worksheet, and the Workbook_BeforeClose / _BeforeSave routine puts it back in place.

The smarter way is to create an add-in. For more, see http://www.mrexcel.com/board2/viewtopic.php?p=148963#148963
flashsam said:
{snip}I know that someone gave an alternative which was an auto_open macro that checked if the macros were active or not and if they were disabled then it gave you a message and then closed the file.
{snip}
 
Upvote 0
Well, you'd be surprised how many people believe it should be possible! ;)
flashsam said:
Was a stupid question wasn't it!

Thanks for the link. I'll check that out now.

Sam
 
Upvote 0

Forum statistics

Threads
1,214,561
Messages
6,120,245
Members
448,952
Latest member
kjurney

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top