ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hiding/Protecting vb code in excel (https://www.excelbanter.com/excel-programming/282029-hiding-protecting-vbulletin-code-excel.html)

IanStrange

Hiding/Protecting vb code in excel
 

Hi can anyone tell me how to either hide or protect the vb code on a
spread sheet.
Thanks
Ian


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/


Ture Magnusson

Hiding/Protecting vb code in excel
 
Ian,

1. Open the workbook that contains the VBA code
2. Activate the Visual Basic Editor by pressing Alt+F11 in Excel.
3. Tools - VBAProject Properties...
4. On the "Protection" tab, check "Lock project for viewing"
and type the same password twice in the textboxes.
5. OK
6. Save the workbook.

The VBA code will not be hidden for you at this point, but if you
switch back to Excel (Alt+F11), close and re-open the workbook,
you will see that the VBA code cannot be seen without providing the
password.

Ture Magnusson
Karlstad, Sweden

"IanStrange" wrote in message
...

Hi can anyone tell me how to either hide or protect the vb code on a
spread sheet.
Thanks
Ian


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/





All times are GMT +1. The time now is 03:30 PM.

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