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 June 1, 2024)
This tip applies to Excel 2002 and 2003


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

Understanding Page Border Art

Add some artwork around the border of your printed page, and you may not know where that artwork comes from. You may also ...

Discover More

Selecting a Cell in the Current Row

Macros often need to select different cells in a worksheet. Here's how you can use macro commands to change which cell is ...

Discover More

Saving Excel Configuration Settings

Excel lets you change lots of settings that affect the configuration of your system. At some point you may want to save ...

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 Directory in a Macro

One of the things you can do with macros is to work with disk files. As you do so, you may have a need to create a new ...

Discover More

Creating and Naming a Worksheet Using a Macro

You can use macros to make your common Excel tasks easier and faster. For instance, if you routinely need to create new ...

Discover More

Delimited Text-to-Columns in a Macro

The Text-to-Columns tool is an extremely powerful feature that allows you to divide data in a variety of ways. Excel even ...

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 6 - 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


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.