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

Creating a Drop Cap

Drop caps can be a nice finishing touch for some types of documents. Word allows you to create three types of drop caps, ...

Discover More

Single-Use Drop-Down List

Want to create an easy drop-down list? You can do so by using the data validation features of Excel.

Discover More

Deleting All Graphics

Graphics can really add pizzazz to a worksheet, but they can also present some drawbacks. If you want to get rid of all ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (menu)

Creating a Plus/Minus Button

Want a quick way to convert positive values to negative and vice versa? You can create your own plus/minus button by ...

Discover More

Pulling Apart Cells

Separating text values in one cell into a group of other cells is a common need when dealing with text. Excel provides a ...

Discover More

Workbook Events

You can create macros that run whenever Excel detects a certain event happening within an entire workbook. This tip ...

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 minus 2?

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.