After installing your Code Signing certificate, you can digitally sign code in Microsoft Office applications (Word, Excel, PowerPoint, Publisher, Visio).
We recommend only signing your code after testing the solution, right before distribution. The digital signature will be removed if the code is altered in anyway. You may also want to lock your macro project when you are ready to sign so that no other users can accidentally change the code and invalidate the signature.
You should make sure to Time Stamp your code signing signature to verify the code was signed before the certificate's expiration date.
DigiCert's Time Stamping URL: http://timestamp.digicert.com
How to Sign Microsoft VBA Macros
- Open the file that contains your macro project.
- Under the Developer tab, in the Code section, click Visual Basic.
- To enable the Developer tab:
- Click File tab.
- Click Options.
- Click Customize Ribbon.
- In Customize Ribbon list, Click Developer.
- Click OK.
- To enable the Developer tab:
- In your Visual Basic Project Explorer, select your project to sign.
- Select Tools menu and click Digital Signature.
- In the Digital Signature dialog, select a certificate, then click OK.
- If you need to select a different certificate, click Choose and select the certificate, then click OK twice.
- Congratulations! Your macro project has been successfully signed.
After installing the certificate, we highly recommend timestamping your code to ensure users can still verify your signature even after the certificate has expired. Click here to learn more about timestamping.