Protect Code

  • Thread starter Thread starter JC
  • Start date Start date
J

JC

Hi...

I've written loads of juicey code but want to protect it
from users hitting alt+f11 and nicking it? And if I
disabled alt+f11 how would I get back into it...Helk in VB
editor not too helpful...

JC
 
JC, To protect the VBA project, from your workbook right-click the
workbook's icon and pick View Code. This icon is to the left of the "File"
menu this will open the VBA editor, in the left hand window right click on
your workbook name and select VBA project properties, protection, check lock
project for viewing and set a password. Press Alt and Q to close this window
and go back to your workbook and save and close the file
--
Paul B
Always backup your data before trying something new
Using Excel 97 & 2000
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
 
n the VBE select Tools/VBA Project Properties to open the
properties window. Select the Protection tab. Check the
Lock fro viewing box and add a pasword. Use a long
password ( at least 10 characters) and use letters,
numbers and punctuation.

"ABC" is easy to crack

abC!D_45?7alPaka may take a while

Patrick Molloy
Microsoft Excel MVP
 
Just to add to the last post, this password can be hacked by third party
software, but it will keep "most" people form getting to your code
 
Hey, so far so good.
but in case you do an ...SaveAs ...
FileFormat:=xlExcel4Workbook ... you get an error 1004.
This error you won't get with an unprotected project.

Does someone know how to make a copy of the original
workbook (in vb), without copying the macros ?

or

how to unprotect the VBProject-Objekt (in vb).

thank you guys
manfred
 
Back
Top