Code Signing Microsoft Office Macros and Visual Basic for Applications

Note: Starting June 1, 2021, GoDaddy will no longer issue or renew Code Signing or Driver Signing Certificates. If you already own a Code Signing or Driver Signing Certificate, you will be unable to rekey it after June 1, 2021. All certificates issued before June 1, 2021 will remain valid until they expire.

A code signing certificate can be used to sign content produced by several Microsoft® Office applications such as Word®, Excel® and PowerPoint®.

Before you get started, make sure the code signing certificate and private key are in the Windows certificate store. Refer to Installing Code Signing Certificate in Windows for installation instructions.

To Code Sign Documents

  1. Open the file you want to sign.
  2. Click the Tools menu, highlight Macro and click Visual Basic Editor.
  3. In the Project Explorer window, select the VBA macro project that you want to sign.
  4. From the Tools menu, select Digital Signature.
  5. Click Choose and select your Code Signing Certificate.
  6. Click OK to close.

Note: By default, Windows® XP and Windows 7 do not add a time stamp to the certificate.

If you would like to allow people to continue using your signed Visual Basic® for Applicaions (VBA) code after the certificate expires, modify the registry on your code-signing computer to add a time stamp at the time of signing using the following keys:

  • Create Key: HKEY_CURRENT_USER\Software\Microsoft\VBA\Security
  • Create String: HKEY_CURRENT_USER\Software\Microsoft\VBA\Security\TimeStampURL
  • Create DWORD: HKEY_CURRENT_USER\Software\Microsoft\VBA\Security\TimeStampRetryCount
  • Create DWORD: HKEY_CURRENT_USER\Software\Microsoft\VBA\Security\TimeStampRetryDelay
  • Set the new fields to these values:
    TimeStampURL = http://tsa.starfieldtech.com
    TimeStampRetryCount = 3
    TimeStampRetryDelay = 2


Was This Article Helpful?
Thanks for your feedback. To speak with a customer service representative, please use the support phone number or chat option above.
Glad we helped! Anything more we can do for you?
Sorry about that. Tell us what was confusing or why the solution didn’t solve your problem.