How to "password protect just the VBA code for an Access database"?

Here're the steps to password protect just the VBA code for an Access database, but not the rest of the database. Steps: In Access, press ALT+F11 to open VBA editor, On Tools menu, select <Database Name> Properties…, On Protection tab, select Lock project for viewing check box, Enter and confirm a password, Click OK, and […]

Here're the steps to password protect just the VBA code for an Access database, but not the rest of the database.

Steps: In Access, press ALT+F11 to open VBA editor, On Tools menu, select <Database Name> Properties…, On Protection tab, select Lock project for viewing check box, Enter and confirm a password, Click OK, and then close and reopen database.

Next time you go to view VBA code, you'll be prompted for password.

Note there're a lot of free or inexpensive tools that allow you to "recover" lost passwords, so protecting your VBA by using this procedure shouldn't be considered a fool-proof security method. However, it's a good way to keep people from accidentally changing the code.

A more robust way to protect your VBA code is to convert the database to an .accde or .mde file, read here.

[Source]

About The Author

Deepak Gupta is a IT & Web Consultant. He is the founder and CEO of diTii.com & DIT Technologies, where he's engaged in providing Technology Consultancy, Design and Development of Desktop, Web and Mobile applications using various tools and softwares. Sign-up for the Email for daily updates. Google+ Profile.