Please Note: This article is written for users of the following Microsoft Excel versions: 2002 and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Digital Signatures for Macros.

Digital Signatures for Macros

Written by Allen Wyatt (last updated October 26, 2020)
This tip applies to Excel 2002 and 2003


1

When you create macros and share them with others, the availability of those macros depends on the security settings on the user's machine. If the security level is set high enough, the user may not even be able to use the macros at all.

One way to help users utilize your macros is to digitally sign them. This capability was introduced by Microsoft in Excel 2002. A digital signature allows a user to know that a macro comes from a trusted source and that it hasn't been modified since it was originally saved by that trusted source. In other words, it is a way for users to be sure that a macro hasn't been tampered with. (Sort of like the product safety seals on some consumer foods and pharmaceuticals.)

In order to digitally sign a macro, you need to first obtain a digital certificate. A certificate is a "seal of approval" from a trusted third party that you are who you say you are. You can get digital certificates from a variety of commercial certificate authorities, each of which has different requirements of how you go about certifying your identity.

You can also create your own digital certificate for testing purposes using the program SelfCert.exe, which is provided with Microsoft Office 2002 and 2003. This route is great for testing, but it won't help you when you distribute your macros to others; you'll still need the certificate from the third-party authority. You can find more information about the SelfCert.exe program by using Excel's online help and searching for "selfcert."

Once you have a digital certificate, you can digitally sign your macro project in this manner:

  1. In the Visual Basic Editor, use the Project Explorer to select the project you want to sign.
  2. Choose the Digital Signature option from the Tools menu. Excel displays the Digital Signature dialog box.
  3. If there is no digital certificate associated with the workbook, or if you want to use a different digital certificate to sign the macro project than what you used for the workbook, click Choose. You can then select which available certificate you want to use.
  4. Click OK to dismiss the Digital Signature dialog box. The certificate you selected (or the certificate used for the workbook) is then used to sign the macro project.

You can find more information about digital signatures in Excel's Help system. You can also find some great information about both certificates and signatures at this page in the Knowledge Base if you are using Excel 2002:

http://support.microsoft.com/kb/288985

If you are using Excel 2003, see this page instead:

http://support.microsoft.com/kb/820738

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3107) applies to Microsoft Excel 2002 and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Digital Signatures for Macros.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Placing Many Graphics in a Document

Word documents can contain more than just text. You can even create documents that contain almost no text at all. This ...

Discover More

Displaying Thumbnails and Full-Size Images

Sometimes images can be just too big to display in a document. Instead you may want to display a smaller, thumbnail-size ...

Discover More

Rounding by Powers of 10

Need to round a value by a power of 10? You can do it by using the ROUND function as described in this tip.

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (menu)

Making Common Functions Available to Others

When you use macros to create functions, you might want to share those functions with others, particularly if they ...

Discover More

Comparing Strings

As your macro is processing information, there will doubtless be times that it will need to compare information in ...

Discover More

Getting User Input in a Dialog Box

Want to get some input from the users of your workbooks? You can do it by using the InputBox function in a macro.

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is seven more than 1?

2016-07-13 03:04:18

ishag A Aziz

Dear web hosting,
Thank you for the great info.
I am using win7, can you please give the same info for Win7, I intend to register my self digital certificate.


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.