Signing Personal MacrosExcel protects you from workbooks containing macro viruses that can harm your computer. It also prevents you from running your own macros. If you haven't changed the default security setting, whenever you open a workbook that contains a macro, Excel displays a message stating that it won't enable macros from unsigned workbooks, including workbooks you've created yourself.
One way to avoid this warning message is to change Excel's security level to Medium or Low, but then you have to either reassure Excel that you don't need the security each time you open your own workbook or forgo the protection from macro viruses. You can enable your own macros without a warning message by adding a digital signature to your VBA project. Before you can sign a project, you need to obtain a digital signature. You can obtain a digital signature in one of three ways: you can request one from your company if you work for a company that can issue digital signatures; you can obtain one from a certificate authority such as VeriSign or Thawte; or you can create a self-signature for your own macros.
Create a Personal Digital Signature Included with your Microsoft Office XP CD is a program you can use to create a personal signature. If you already have a digital signature from your company or a certifying agency, do not create a personal signature, but use the official one you already have.
You've now created a personal signature that you can use to sign your macro projects. Add a Signature to Your Project You add a signature to the VBA project part of your workbook. If a virus-or anything else-changes the VBA project, the signature becomes invalid. The signature applies only to the VBA project, not to the workbook data, so anyone can change the worksheets without invalidating the signature.
The project in the Chapter01 workbook is now signed. If you need to modify a macro, as long as you do it on the machine that contains your digital signature, VBA automatically reapplies the signature. But no one else can reapply your signature to the project. Trust a Signature Now that you have a workbook containing a signed project, you can tell Excel to trust workbooks that contain macros you have signed.
Security is important when you create any programs, including macros. Security is especially important when you share applications with others. If you create macros for others to use, you'll probably want to obtain a properly authenticated digital signature to protect your work. |