PDA

View Full Version : Solved: VBA Password Protection



gimli
05-18-2010, 04:31 AM
Hi all,

Whats the best way to protect VBA code from being seen or altered. Right now the workbook is protected but is there a way to hide/secure the code from being altered?

thanks

stanleydgrom
05-18-2010, 06:39 AM
gimli,

Open your workbook
Press the keys ALT + F11 to open the Visual Basic Editor

Click on Tools
VBAProjectProperties...
Click on the Protection tab
Click in the box for Lock project for viewing
In the Password to view project properties box
Enter a password in the two boxes for Password, and Confirm password
Click on the OK button

Do not forget your password, and save your workbook.

gimli
05-18-2010, 07:01 AM
Ahhh excellent! Thanks much

Aussiebear
05-18-2010, 10:29 PM
Excel's protection is very basic, and easily broken, so the harsh reality is this - Just who are you "protecting the workbook from"?

There far too many commercial products currently available, which break protection. So if someone has a will to do so, then it'll be done. Protection is something that Microsoft has been unable to come to grips with at this point.

gimli
05-19-2010, 04:19 AM
Its for intra company use only..not a large threat. Just wana make sure that curious people cant change stuff on purpose or by accident...

So I think the basic protection will be just fine.

thanks much