How to Change a VBA Password

By Ty Arthur

VBA passwords protect your code from being changed.
i attractive woman using computer image by Paul Hill from Fotolia.com

VBA (Visual Basic for Applications) is a programming tool integrated into Excel, Word and the other Microsoft Office programs. VBA lets you use Visual Basic coding to change your document and add extra features, such as running repetitive tasks automatically. You probably don't want any other user to be able to directly modify your code, which may cause serious problems with your documents. To keep your code safe, the Visual Basic editor gives you the option to create and change a VBA password.

Open the Microsoft Office document that has the VBA password. Select the "Developer" tab, which is positioned at the top-right end of the window.

Click the name of the appropriate worksheet at the left side of window, if you are changing the VBA password in an Excel document. Click the "Tools" button at the top of the window and select the "VBA Project Properties" option.

Navigate to the tab labeled "Protection." Click the "Lock Project For Viewing" check box, if it isn't already checked.

Highlight the string of "*" symbols in the "Password" box and hit the backspace key. Type the new password you want to use in the box. Delete the text in the "Confirm Password" box and re-type your new password.

Click "OK." Open the "File" menu and choose "Save." Close and then re-open the document to save the new VBA password.

×