Excel VBA Code Signing

oseitutuSamuel

Board Regular
Joined
Jul 31, 2015
Messages
82
Hi All,
I have purchased and installed a commercial code signing certificate for my Excel VBA workbooks. The VBA files seems to be properly signed.
However, if I open any of the files, I still receive a message that Macros have been disabled. Yet when I open the VBE and check Tools --> Digital Signature, the certificate is there.
I have set Excel options to disable all macros except digitally signed macros. I am at my wits end and seeking help. Do I still need to place the file in the Trusted Location?
I thought if I do that it will defeat the purpose of signing the file in the first place.

Thanks
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
I haven't used Digital Signatures in about 5-10 years, but I used to use them a lot.

If I recall correctly, the first time opening the file, it tells that the file has a digital signature on it, and you had to view and accept it. Once accepted, it should be good going forward.
However, I believe this is user and workstation specific. So if you accept it, it is only accepted for you on that computer. All other users have to accept it themselves on their computer.
 
Upvote 0
Tha
I haven't used Digital Signatures in about 5-10 years, but I used to use them a lot.

If I recall correctly, the first time opening the file, it tells that the file has a digital signature on it, and you had to view and accept it. Once accepted, it should be good going forward.
However, I believe this is user and workstation specific. So if you accept it, it is only accepted for you on that computer. All other users have to accept it themselves on their computer.
Thanks Joe. Will check this early morning first thing
 
Upvote 0
Dear All,
I have applied a digital certificate to a VBA code. In the process I had to export the certificate from the computer where it was installed
and then use the command prompt to import the certificate into Excel/Office. When the process was completed, the certificate was added to
the Trusted Publishers list in Excel as shown below
1594882305676.png

To test it, I configured a second computer to "Disable Macros Except Digitally Signed Macros". Then I signed a vba workbook
from the first computer. When I open the file in the second computer, I get the usual Macros are disabled message. I checked the Trusted Publishers list and it is
empty. "Issued To" and "Issued By" are blank. I do not want users of my workbook to go through the process I went through in the first computer to establish the Trusted Publishers
I thought that if Excel is set to Disable Macros Except Digitally Signed Macros, it will allow signed vba files to run without any further work on the user's machine.

Any help will do please. Thanks
Sam
 

Attachments

  • 2020-07-16_14-43-28.png
    2020-07-16_14-43-28.png
    13.8 KB · Views: 15
  • 1594881947288.png
    1594881947288.png
    5.5 KB · Views: 16
Upvote 0
As far as I know, you will need to add the signature to the trusted publishers list on each computer.
 
Upvote 0
I thought that if Excel is set to Disable Macros Except Digitally Signed Macros, it will allow signed vba files to run without any further work on the user's machine.
Think about it. If it worked that way, it would be really easy for hackers to push harmful code on your computer. All they would have to do is digitially sign a document.

The way that it works when you digitally sign a document, is that you need to tell that computer that you accept that signature, confirming it is a good and trusted one. Once you do that on a user's computer, any other document signed with the same signature will be accepted, because you have already established that it is a trusted signature. So you have to go through the initial step once, of adding it to your trusted signatures.

Also note that if anyone else were to save a digitally signed document, the digital signature will be dropped from that document. If you think about it from a security perspective, that makes perfect sense too. Otherwise, people could take digitally signed documents, and add harmful code to them, and your computer would still think it was a safe, trusted document.
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,467
Members
448,965
Latest member
grijken

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