Signing an Excel VBA macro with a certificate, especially one from an external provider like Certum, can sometimes result in errors due to various factors such as compatibility issues, the digital certificate’s properties, or the way the certificate is installed and used. Given that you’ve received an error stating “There was a problem with the digital certificate. The VBA project could not be signed. The signature will be discarded,” here are a few steps and considerations to troubleshoot and potentially resolve the issue:
Ensure the digital certificate is specifically intended for code signing. Code signing certificates are distinct from SSL or other types of certificates because they are designed to sign software, macros, and applications. The certificate should allow for the signing of VBA macros explicitly.
Ensure the certificate has been correctly installed in the Windows Certificate Store, particularly in the “Personal” store. Sometimes, manually installing the certificate to the right store can resolve issues.
If your certificate is part of a chain (i.e., it requires intermediate certificates), ensure that the entire chain is correctly installed on your system. Missing intermediate certificates can lead to validation failures.
Although rare, compatibility issues might arise. Ensure that the version of Excel and the operating system are compatible with the requirements specified by Certum for using their certificates.
Ensure that the certificate has not expired and has not been revoked. You can check the certificate’s status through its properties dialog in the Windows Certificate Store or using Certum’s tools, if available.
Excel’s macro security settings might be too stringent, preventing the signing process from completing successfully. Adjust these settings temporarily to see if it affects the ability to sign the VBA project.
Some users have reported success using dedicated third-party tools for code signing when facing issues with direct signing from within Excel. These tools can offer more detailed error messages and troubleshooting options.
Since Certum has indicated that other clients have successfully used workarounds, reaching out to their support team could provide you with specific steps or tools they recommend. They might have encountered this issue before and could offer a tailored solution.
If possible, try signing the macro on a different machine. This can help determine if the issue is specific to your computer’s configuration.
Since this issue involves a workaround rather than a standard feature, searching for or asking in technical forums such as Stack Overflow or specialized Excel and VBA forums might yield useful advice from others who have encountered and solved similar issues.
Given the specific nature of the issue and the reliance on workarounds, success might require a combination of the above steps or even specific guidance from Certum or others who have successfully signed VBA macros with external certificates.