ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Workbook_Open & Macro (https://www.excelbanter.com/excel-programming/303131-re-workbook_open-macro.html)

James Cox[_2_]

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





All times are GMT +1. The time now is 09:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com