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

Rotating Graphics Around a Different Center Point

You use the rotation handle in Word 2002 and Word 2003 to, well, rotate graphics around a center point. But if you hold ...

Discover More

Formulas Don't Calculate as Formulas

Enter a formula (starting with an equal sign) and you may be surprised if Excel doesn’t calculate the formula. Here's a ...

Discover More

Printing Two Worksheets on a Single Page

Getting your printouts to appear on a printed page exactly as you want can be a challenge at times. What if you want to ...

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)

Determining if Calculation is Necessary

When processing a worksheet with a macro, it may be helpful to periodically recalculate the worksheet. Wouldn't it be ...

Discover More

Generating Unique, Sequential Names

Do you need to create a number of words or phrases where you only alter a few letters in each one? If the alterations ...

Discover More

Swapping Two Numbers

When programming macros, variables are used extensively. At some point you might want to exchange the values held by two ...

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 one less than 9?

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.