View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
James Cox[_2_] James Cox[_2_] is offline
external usenet poster
 
Posts: 39
Default Workbook_Open & Macro

Not precisely sure what level of protection you are interested in, but in
the VBA editor, if you select Tools | VBA Project Properties | Protection
there is a field labeled "Password to view project properties" that may give
you what you need.

Without the password, the user cannot open up and view any of the code in
the workbook. Do be aware however that such passwords can be cracked pretty
easy. If all you want is to keep the causual user from messing up your
code, it works pretty well....

James

"Metallo" wrote in message
...
Hi,

I did create the Workbook_Open code to protect the sheets in my WB and at

the same time to guarantee the outlining function to work, the Macro allows
a change of formatting, therefore, I put the Workbook_Open code on top and
bottom of the Macro in order to let it work properly.

My next problem is that I have to give the WB to other users, therefore I

need to apply a Password to both the Workbook_Open code and, as a result, in
the Macro.

How do I make them invisible in both WB_Open and Macro?

If I add the password, a user with a minimum of knowledge, jcam just click

ALT+F11 and he gets the password.

Thank you
Alex