DigiCert KnowledgeBase - Technical Support-hero

Knowledge Base

Error: There was a problem with the digital certificate. The VBA Project could not be signed. The signature will be discarded

Solution ID : SO1451
Last Modified : 09/18/2024

Problem

When trying to sign a VBA macro project, the following error message appears:

There was a problem with the Digital Certificate. The VBA Project could not be signed. The signature will be discarded.

Cause

This error occurs when the option Include all certificates in the certificate path if possible was not selected during the export process.

Solution

Note: This solution is only applicable for standard code signing certificates. Once the industry requirement change takes place to align standard code signing private key protection with Extended Validation code signing certificate, the instruction in this article won't be applicable to standard code signing certificate either.

To resolve this issue, export the certificate from the original computer with Include all certificates in the certificate path option selected.

Step 1: Export Microsoft Office and VBA Signing Digital ID

  1. From the Microsoft Internet Explorer browser, click Tools Internet Options > Content Certificates
  2. On the Personal tab, select the certificate and click Export
  3. A wizard appears. Click Next
  4. Select Yes, export the private key > click Next
  5. Select Include all certificates in the certificate path if possible
  6. If you wish to require a password each time the ID is accessed, select Enable strong protection
  7. Enter a new alphanumeric password of no more than 10 characters to protect this export file. Confirm the password > click Next
  8. A wizard appears. Specify the File name and location for the export file. DigiCert strongly recommends that you write the file to a diskette or CD

Step 2: Import Microsoft Office and VBA Signing Digital ID

  1. From the Microsoft Internet Explorer browser, click Tools Internet Options > Content Certificates
  2. On the Personal tab, click Import. A wizard appears and asks for the file name
  3. Click Browse
  4. Select the file you created during the export process. The wizard asks for a password
  5. Enter the password you created during the export process
  6. Select Mark the key as exportable > click Next

Now, try signing from the new exported certificate.

You can also try creating your own digital certificate for personal use or testing purposes with SelfCert.exe tool that is provided in Microsoft Office and use it to sign the excel sheet.
However, this certificate is not authenticated by a Certificate Authority (CA), so it will just be a test to see if there is any issue with the DigiCert certificate.

This info can be found in the below Microsoft article:
https://docs.microsoft.com/en-us/office/troubleshoot/excel/digital-signatures-code-signing

Disclaimer

DigiCert publishes the information herein as a courtesy to its customers. Because the information may not have been vetted for accuracy, DigiCert makes no warranty of any kind, express or implied, with respect to its validity.

SECURE UP TO 250 SUBDOMAINS WITH A DIGICERT WILDCARD TLS/SSL CERTIFICATE.