Need To Protect "Tab code"

  • Thread starter Thread starter GEdwards
  • Start date Start date
G

GEdwards

I have code within a tab, for example a "Private Sub
Worksheet_SelectionChange...". I was suprised that although I PROTECT the
worksheet with a password, the code within the tab is still accessible and be
modified.

How can this too be protected from anyone updating it?
 
You can protect all the code (the entire workbook's project, actually), by:

Opening your workbook
Open the VBE (alt-f11 is a quick way to get there)
Show the project explorer (ctrl-r)
Select your project

Tools|VBAProject Properties|Protection tab

Give it a nice (memorable!) password.

Back to excel
Save, close, and reopen the workbook to test.

Be aware that like most passwords everywhere, there are ways of cracking it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top