none
Excel don't accept macro signature RRS feed

  • Question

  • I tried to sign an excel macro. But it doesn`t work.

    I've created a Root CA and a code sign cert with the help of this "tutorial": 

    https://stackoverflow.com/questions/84847/how-do-i-create-a-self-signed-certificate-for-code-signing-on-windows

    Now I have added the Root CA to the trusted root authorities on my development PC. Then I did the following steps to sign my macro:
    1.) Open the file that contains the macro project that you want to sign.
    2.) On the Developer tab, in the Code group, click Visual Basic.
    3.) In Visual Basic, on the Tools menu, click Digital Signature.
    4.) The Digital Signature dialog appears.
    5.) Select a certificate and click OK.

    On my development PC everything works well. Now I added the Root CA to the trusted root authorities on an other PC. Windows says that the Root CA and the code sign cert are valid and trusted. So everything seems fine.

    Then I tried to open the excel file. Excel says that the macros can`t be loaded because the code sign cert is untrusted. Then I click the "show certificate" button windows says that the cert ist valid again.

    What did I wrong? How can I get it to work? Thanks

    PS: Office Version 2010 and Win 7

    Tuesday, May 10, 2016 10:14 PM

All replies

  • Hi zuzsz,

    Here its look like we are not able to use same certificate on different machines. So you can try to create a new digital certificate on your destination machine instead of using the same one that you use on your system.

    For other workarounds and some more information regarding this issue please visit the links below.

    Digitally sign your macro project

    Share Digital Certificate for VBA Between Several PC(s)

    How Can I Use A Self-signed Digital Certificate On Two Computers - Excel

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 11, 2016 4:48 AM
    Moderator
  • Hi zuzsz,

    Here its look like we are not able to use same certificate on different machines. So you can try to create a new digital certificate on your destination machine instead of using the same one that you use on your system.

    Thank you for your answer. I can`t believe that this is true. This is not what macro signing is supposed to do. I`m pretty sure you can use the same signatur on multiple PCs.

    Let`s have a look on this link together: http://domainwebcenter.com/?p=868

    To install a Digital Certificate for VBA in Office 2007, click on Security Warning Options… button. Click on Show Signature Details –> View Certificate –> Install Certificate…. The crucial moment here is to force the location of the certificate to folder “Trusted Root Certification Authorities“.

    I`ve created a root CA cert and based on this a code sign cert. I added the root CA to the windows trusted root authorities store. Windows also says that both certs are valid/trusted. So I think this step is done.

    Restart Excel one more time, pick option Trust all documents from this publisher from Security Warning dialog box and test if Security Warning is gone on Excel restart.

    I don`t get this second message. I get directly the message that the cert is untrusted. Maybe because the macro security option ist set by a GPO? How can I make a document/certificate trustworthy to excel?

    Wednesday, May 11, 2016 6:41 AM
  • Hi post123,

    I have already provided that link in my last post to solve this issue.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 11, 2016 8:59 AM
    Moderator
  • Hi post123,

    I have already provided that link in my last post to solve this issue.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Please read my hole post. This links aren't helping me. I did what the links says. It`s STILL not working.
    Wednesday, May 11, 2016 1:23 PM
  • Hi zuzsz,

    is your issue solved? or you are still facing a problem with that?

    if you have found the solution by yourself then would you like to share it with our community so that if other community member have same issue like you can also get solution by your post.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, May 13, 2016 10:02 AM
    Moderator
  • I am having this same issue.  Our certificate is trusted but Excel macros no longer except.  I have confirmed that our cert the locations in this article.  I continue to get a message saying "Because of your security settings, macros have been disabled. To run macros, you need to reopen this workbook, and then chose to enable macros."  We have it set to disable all macros unless signed.  The macros are signed.
    Thursday, December 14, 2017 1:48 PM
  • Hi Brian Kilbourne,

    I can see that you are facing similar kind of issue.

    here, I want to inform you that please try to create a new thread for your issue.

    as you can see that this thread was inactive from long time.

    if you create a new thread then there is a better possibility to get more replies and solutions.

    so you can try to create a new thread with all the detailed information about your issue.

    we will again try to make a test for your issue and try to provide you a all possible suggestions to solve the issue.

    thanks for your understanding.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, December 15, 2017 1:24 AM
    Moderator