When trying to sign a VBA macro project, the following error message appears:
This error occurs when the option Include all certificates in the certificate path if possible was not selected during the export process.
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
Step 2: Import Microsoft Office and VBA Signing Digital ID
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:
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.