enable / disable macros

  • Thread starter Thread starter Tiffany
  • Start date Start date
T

Tiffany

Is there a way to write some code to make it so that if a user opens a
workbook and chooses to disable macros, the workbook will not open and give
the user a message saying that this workbook cannot be opened without
enabling macros? The reason I am doing this is to make sure that when a
user first opens the workbook they logon and that logon will run a piece of
code to delete the sheets in the workbook that are not meant for them. But
if they disable macros, they will be able to by pass the logon code and
could see everything in the workbook.

Thanks in advance for your time!!
 
Hi

Not really. And it's the other way around: Everything should be invisible and useless when
closed, and macros enabled should display selected things.

But beware anyway; nothing is really safe in an excel file. If something is not intended
to be seen, do not include it in the file, no matter how good you believe it's hidden.
It's not.
 
Back
Top