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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

tusharm

MrExcel MVP
Joined
May 28, 2002
Messages
11,029
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}
 

flashsam

Board Regular
Joined
Nov 13, 2003
Messages
59
Was a stupid question wasn't it!

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

Sam
 

tusharm

MrExcel MVP
Joined
May 28, 2002
Messages
11,029
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,095
Messages
5,768,054
Members
425,451
Latest member
JohnBrooksBiddle

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
Top