MS-Excel / General Formatting

Assign a Digital Signature to a Macro

A digital signature provides assurance that a workbook file is valid and no one has altered it. There are two types of digital signatures: personal digital signatures and commercial digital signatures. You can create a personal digital signature by using the Microsoft Selfcert.exe tool, or you can purchase a digital signature. Refer to the section, "Create a Digital Signature," to learn how to create digital signatures.

After you create a digital signature, you must attach it to your workbook. Attaching a digital signature is similar to sealing an envelope. If an envelope arrives sealed, you have some level of assurance that no one has tampered with its contents.

Use the Digital Signature dialog box to attach a digital signature. The Visual Basic Editor is a separate Excel module that you can use to edit your macro. You access the Digital Signature dialog box by opening the Visual Basic Editor. The Digital Signature dialog box lists valid certificates. You can use the Digital Signature dialog box to view certificates and to select the one you want to use.

Unless you have on your computer a valid digital signature certificate for the signature used to sign a macro, Excel removes the digital signature if you modify a macro in a workbook, and you must reattach it. If you are not sure if a workbook has a digital signature, you can check the signature by reviewing the Digital Signature dialog box. If a workbook has a digital signature, the name of the signature appears in the Certificate Name field. If you click the Remove button in the Digital Signature dialog box, Excel removes the digital signature.

See how to assign:

  1. Click the Developer tab.
  2. Click Visual Basic in the Code group.
    The Visual Basic Editor appears.
  3. Click Tools> Digital Signature.
    The Digital Signature dialog box appears.
  4. Click Choose. The Select Certificate dialog box appears.
  5. Click the signature you want to apply.
  6. Click OK to close the Select Certificate dialog box.
  7. Click OK to close the Digital Signature dialog box.
    Excel attaches the digital signature to your workbook.
[Previous] [Contents] [Next]