Office suite Microsoft Office provides several levels of data protection designed to control the level of user access and the ability to make changes to the selected document. The recommended action is to set a password for the entire required file, although the ability to protect an individual macro is also provided.
Necessary
Microsoft Office Word
Instructions
Step 1
Open the "Service" menu of the top toolbar of the window of the office application you are using and select the "Macro" item to initiate the protection of the selected macro.
Step 2
Select the "Visual Basic Editor" item to launch the tool and call the context menu of the macro to be protected by clicking the right mouse button.
Step 3
Specify the VBAProject Properties command and go to the Security tab of the properties dialog box that opens.
Step 4
Apply the checkbox to the Lock Project for Viewing field and enter the desired password value in the Password field.
Step 5
Click OK to confirm the command.
Step 6
Run the Digital Certificate for VBA Projects tool and create your own digital signature for an alternative method of protecting your macro.
Step 7
Press the "Start" button to bring up the main menu of the system and go to the "Run" item.
Step 8
Enter mmc in the Open field and click OK to confirm the execution of the command to run the management console.
Step 9
Simultaneously press the function keys Ctrl + M and click the Add button.
Step 10
Specify the Certificates snap-in in the dialog box that opens and add it to the console.
Step 11
Select the generated digital signature file and export it to disk. The result of this action will be a file with the *.cer extension.
Step 12
Return to the Visual Basic Editor tool and navigate to the Tools / Digital Signature section.
Step 13
Use the generated certificate file to sign the required macro and navigate and return to the office application you are using.
Step 14
Expand the Options menu on the top toolbar and go to Security.
Step 15
Select the Macro Protection group and apply the checkbox to the Very High field in the Security Level section. This action will make it impossible to change the selected macro by any user who does not have the required certificate.