Forum Discussion
Difficulties signing the vba project code
I face difficulties when I want to sign an Excel vba project. The error "A problem occured with the digital certificate. The VBA-project can't be provided by a digital signature. The signature is being removed".
We are using an USB key of DigiCert (EV code signing with SHA2 encryption) and signing works correctly for exe's and dll's. Everything looks okay from DigiCert point of view.
The error does occur when I want to save the Excel file.
I can sign without problems when it is a self issued certificate.
Some time ago this was working well.
10 Replies
- yasensimeonovCopper ContributorWe find ourselves in the exact same situation, since May this year (2022) when we renewed our EV Code Signing certificate. Ever since we renewed and started using the new USB token, the problem appeared. Beforehand (previous two renewals) it was working fine - instead of the dreaded "There was a problem with the Digital Certificate. The VBA Project could not be signed. The signature will be discarded." error we would get a popup window from "SafeNet Authentication Client" asking us to input the token password. If the correct password was provided, the VBA Editor would sign and save the project.
After the issue first appeared in May this year (2022), when renewing with the provider we had been successfully using during the previous two years (Sectigo), we have since (this September) purchased a new EV Code Signing certificate from DigiCert. Unfortunately, the behavior is exactly the same. I have a suspicion that the issue may NOT be with the CA (Sectigo/DigiCert), but rather with the manufacturer/supplier they both use for the USB hardware tokens - it used to be "Gemalto" before May this year (when VBA signing worked) and now it is "Thales".
The change in USB hardware token manufacturer/supplier can also be seen in the branding of the "SafeNet Authentication Client" software - it used to be "Gemalto" in earlier versions, while it now reads "Thales". In the next few days, I will log our issues and findings with DigiCert technical support, asking them to investigate further and raise this with Thales, if necessary. I will share any progress and hopefully a successful resolution here.- yasensimeonovCopper ContributorP. S. A similar issue has been reported as recently as the beginning of this month on StackOverflow: https://stackoverflow.com/questions/73584355/signing-vba-code-in-excel-xlsm-files-there-was-a-problem-with-the-digital-cert
- Anna-LawgicCopper Contributor
yasensimeonov Digicert sent us an older version of the SafeNet software - version 10.8.2154.0
This version does work when signing VBA macros. Anyone at our firm with a newer version cannot sign macros.
- Anna-LawgicCopper Contributor
BernardW Did you ever find a solution to this issue - I am experiencing this issue on a newly purchased Digicert EV token. Thank you