View - Events - Password
Ribbon bar. Select the View tab. In the Display group, click Events and from the menu, select Password.
Classic menus. From the View - Events submenu, select Password.
This displays the Setup Event Password dialog box, which is used to enter a password to restrict access to editing document-level events. With document-level events, you can customize the behavior of open documents.
Enter a password in the New password box, reenter it in the Confirm new password box, and then click the OK button. The next time someone selects View Code from the View - Events menu, the Password dialog box is displayed. The correct password must be entered before the Document Events window is displayed.