Digital Signature / Certificate


Board Regular
Mar 15, 2016
I am looking for anyone who has had experience with Digital Certificates and Signatures.
The end goal is that when an employee at the company I work for opens up a Excel xlsm, it auto Enables Content.
I get there is a Trusted Location option, but I think a Certificate or Signature would work best.

I believe we do have VeriSign, but I am not exactly sure how to use it in Excel. I get that once the certificate expires, the code does as well.

I have researched a lot of websites which don't really point me in the direction how to use it. - I am hoping for a response from someone who has had experience with this.

Some videos you may like

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.


MrExcel MVP, Moderator
Jun 12, 2014
Office Version
I've always used the MS SelfCert, so it may be different from VeriSign, but once you have a cert in the VBE > Tolls > Digital Signature > Choose > select the signature > OK > Ok.
Then save the workbook


MrExcel MVP
Oct 15, 2007
I use makecert.exe and Solution version 1 at

Solution version 1: Use makecert.exe with the "-pe" option to create and store the certificate with an exportable private key:

makecert -r -pe -n "CN=Your Name" -b 01/01/2000 -e 01/01/2099 -eku -ss my

Then you can export the certificate from the Windows certificate store, including the private key. Export as a .PFX file.

Additional notes

1. Computer A
Type above command to create the certificate "Your Name" in the Current User > Personal certificate store.
Export the certificate from Current User > Personal and save as a .pfx file.
Import the .pfx file into Current User > Trusted Root Certification Authorities and Trusted Publishers stores.

2. Computer B
Import the .pfx file into Current User > Personal, Trusted Root Certification Authorities and Trusted Publishers stores.

The certificate must be put in the Personal store for it to appear in the Select certificate dialogue box in Excel VBA project > Tools > Digital Signature > Choose. I'm not sure, but I think the certificate should also be placed in (imported into) the Trusted Root Certification Authorities and Trusted Publishers stores, hence why I mention these two stores in both Computer A and B steps.

The last time I looked, the latest version of makecert.exe is available in an installation of Fiddler
Last edited:

Watch MrExcel Video

Forum statistics

Latest member

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...