Current location - Quotes Website - Signature design - How to obtain VBA digital certificate?
How to obtain VBA digital certificate?
1. Generate the digital certificate of VBA project.

There is a "VBA Project Digital Certificate" (Start-Program-Microsoft Office Tools -VBA Project Digital Certificate) in the tools that come with Microsoft Office. Click this menu, enter the certificate name (any string) in the pop-up dialog box, and click OK to generate a digital certificate, as shown in the following figure:

2. Add a digital signature to the VBA project.

Open the Excel file, enter the VBA development environment, and click the menu: Tools-Digital Signature to open the following dialog box:

Click OK, and finally save the file. If there are multiple digital certificates, you can click the "Select" button to select the appropriate digital certificate, and then confirm and save it.

Step 3 permit

The first time you run an Excel file with a digital certificate, a security warning appears. Click the pop-up dialog box, select "Trust all documents from this publisher", and then confirm, as shown below:

At this point, when you open the Excel file and all Excel files using the digital certificate in the future, there will be no security warning prompt, and the macro can be executed safely. When developing programs in the future, just add this digital certificate.

4. Let others use your program.

After the above process is completed, there is no problem with this machine. But when you send an Excel file to someone else, someone else's machine will prompt you not to know this digital certificate and refuse to execute your macro. What should I do?

All you have to do is export the digital certificate and send it to others for installation. After installation, it will be the same as your machine. The method of exporting digital certificates is: