vba check for disabled macros

R

Ray Maas

I have a macro that needs to run when my users open a spreadsheet.
Unfortunately, most of their security settings do not allow macros to run.
I know this cannot be overridden in VBA, that would defeat the purpose of
the security.

So how, in VBA, can I check to see if they have selected to disable macros,
then give them a messagebox that says something like "sorry, you have to
enable macros to use this application"?

Thanks,
Ray Maas
 
A

Andrew Taylor

The usual trick is to hide all the worksheets except a dummy one
that says "You need to enable macros to use this workbook",
and make the Workbook_Open event hide this one and
unhide the others.
 
A

Ardus Petus

If user disabled macros, no VBA code will run (even to check macro enable
status)

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top