Visual Basic for Applications (VBA) is a programming language for Microsoft Office. When you write VBA within your Office applications, you may not want other users to see or modify your VBA code. The solution is to place password protection on your VBA files. Once you've placed a password on the file, Microsoft's strong encryption will prevent anyone from accessing the file. If you lose your password, Microsoft won't help you get it back; the tough encryption may mean your database is lost forever. However, there is a little-known workaround.
- Skill level:
Other People Are Reading
Press "Alt" and "F11" from within the Office application you want to get the VBA password for. For example, press "Alt" and "F11" together in Access.
Click "Insert" and then click "New Module."
Press "Ctrl" and "G" together to open the debug window.
Type "? StPasswordOfStDatabase("c:\desktop\myfile.mdb")" into the debug window.
Replace "c:\desktop\myfile.mdb" with the path name to your database. The code as written will return the password for a file called "myfile" located on the Desktop.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for