logo
search
VBA & Macro Problems

Fix Certificate Not Appearing for Signing VBA Code in Office

Partner EditorPartner Editor Oct 7, 2026 868 views

Question details

The user is unable to find or select their imported digital certificate when attempting to digitally sign VBA code in Microsoft Office.

Fix Certificate Not Appearing for Signing VBA Code in Office
Product
Microsoft Excel
Device & OS
Windows
Scenario
Attempting to digitally sign a VBA macro project using a certificate imported from a .cer file, sometimes installed in the local computer store.
Observed behavior
The certificate is completely missing from the list of available certificates in the VBA Editor's digital signature options, even when running the application as an administrator.
Before you start

Ensure you are logged into Windows with the user account that will be running the Office application. You will also need access to your original certificate file that includes the private key (typically a .pfx or .p12 file).

Solution 1Recommended

Install the Certificate with a Private Key in the Current User Store

Office VBA requires the code signing certificate to possess a private key and be located in the Current User's Personal certificate store.

A standard .cer file usually contains only the public key. To digitally sign VBA code, the corresponding private key must be present on the system. Furthermore, Microsoft Office specifically looks for code signing certificates within the Current User store, meaning certificates placed in the Local Computer store will not appear in the VBA editor.

1
Open Certificate Manager

Press the Windows key + R to open the Run dialog. Type certmgr.msc and press Enter. This opens the Certificate Manager specifically for the Current User.

2
Verify Existing Certificate Status

Expand the 'Personal' folder in the left pane and click on 'Certificates'. If your certificate is listed, double-click it. Look for a message on the General tab stating, 'You have a private key that corresponds to this certificate.' If this message is missing, you cannot use this certificate for signing.

3
Import the Correct Certificate File

If the private key is missing or the certificate is not listed, right-click the 'Certificates' folder, select 'All Tasks', and click 'Import'. Follow the Certificate Import Wizard.

4
Select a File with a Private Key

When prompted to choose a file, ensure you select a file format that includes the private key, such as a .pfx or .p12 file, rather than a .cer file. Complete the wizard to finish the installation.

Install the Certificate with a Private Key in the Current User Store
Verify Code Signing Purpose: Ensure that the certificate's 'Intended Purposes' includes Code Signing. Certificates issued for other purposes, such as web server authentication, will not be displayed as options for signing VBA macros.
Free Microsoft Office alternative

Experience Seamless Document and Macro Support with WPS Office

Troubleshooting complex Windows certificate stores and VBA environment settings in Microsoft Office can be time-consuming. If you are looking for a reliable, lightweight, and highly compatible alternative, try WPS Office. It provides comprehensive support for standard Office file formats and offers robust tools for advanced users without the steep learning curve.

  1. 1. Download the Installer: Visit the official WPS Office website and click on the 'Download WPS Office Free' button.
  2. 2. Install WPS Office: Run the downloaded setup file and follow the straightforward on-screen prompts to install the suite.
  3. 3. Open Your Spreadsheets: Launch WPS Spreadsheets and open your existing Excel files directly, enjoying immediate compatibility.
Fully compatible with Microsoft Excel, Word, and PowerPoint formats (including .xlsm and .docm).Lightweight installation with a familiar, user-friendly tabbed interface for seamless migration.Cost-effective alternative providing premium features without expensive subscriptions.Free to download with comprehensive cross-platform support for Windows, Mac, Linux, iOS, and Android.
microsoft office alternative - wps office

Frequently Asked Questions

Can I use a .cer file to sign my VBA macros?

Generally, no. A .cer file typically only contains the public key of the certificate. To digitally sign code, you must have the associated private key, which is usually stored in a .pfx or .p12 format file.

Why doesn't running Excel as an administrator fix the missing certificate issue?

Running Excel as an administrator changes the application's system permission level but does not change where it looks for certificates. Office VBA specifically queries the Current User's Personal certificate store. If the certificate is stored in the Local Computer store, Excel won't find it regardless of its permission level.

How do I know if my imported certificate actually includes a private key?

Open the Certificate Manager by typing certmgr.msc in the Run dialog. Double-click your certificate and look at the bottom of the General tab. You should see a message stating: 'You have a private key that corresponds to this certificate.' If this is missing, the private key was not imported.

What happens if my certificate is not issued specifically for code signing?

If the certificate's intended purpose does not explicitly include 'Code Signing', the Office VBA Editor will filter it out. It will not appear in the list of available signatures, even if the private key is present and it is stored in the correct location.