Digital Signature / Certificate

bsquad

Board Regular
Joined
Mar 15, 2016
Messages
194
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.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
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
 
Upvote 0
I use makecert.exe and Solution version 1 at http://www.source-code.biz/snippets/vbasic/3.htm.

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 1.3.6.1.5.5.7.3.3 -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:
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,775
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top