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. Sectigo's Time Stamping URL is

How to Sign Microsoft VBA Macros

  1. Open the file that contains your macro project.
  2. Under the Developer tab, in the Code section, click Visual Basic.
    1. To enable the Developer tab: 
      1. Click File tab.
      2. Click Options.
      3. Click Customize Ribbon.
      4. In Customize Ribbon list, Click Developer.
      5. Click OK.
  3. In your Visual Basic Project Explorer, select your project to sign.
  4. Select Tools menu and click Digital Signature.
  5. In the Digital Signature dialog, select a certificate, then click OK.
    1. If you need to select a different certificate, click Choose and select the certificate, then click OK twice.
  6. 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.