View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ture Magnusson Ture Magnusson is offline
external usenet poster
 
Posts: 21
Default 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/