简体   繁体   中英

What is the easiest way to add Macro automatically to a set of Excel Files

I have a macro function that I have added to an excel file. My question is how can I add the same macro function to a specific set of excel files without copy pasting the macro in each excel vba editor.What is the easiest way to achieve this?

The objective is for the users who have no knowledge on excel macros should be able to easily add Macros to excel and execute it.

If the people who are importing the macros are also the users of these macros you might want to create an add-in out of your vba macro. The procedure is described here . The users would just have to install the add-in on their PCs once( step 4 ). They can then use the add-in for several Excel-files.

This needs to be done by each user once:

Step 4: Install the Add-In:

Go to Tools > Add-Ins to open the Add-Ins dialog. If you have stored your Add-In in the default location you will see its name displayed in the Add-Ins available: window (if you have stored your Add-In in a different folder, use the [Browse] button to find it). Click on your Add-In's name to see its description at the bottom of the dialog box.

To install your Add-In place a tick in the check-box next to your Add-In's name and click [OK]. [Click the thumbnail below to see a full-sized image]...

Installing your Add-In (Excel 2002) Installing your Add-In (Excel 2000/97)

As soon as the Add-In is installed its functions will be available in Excel. Find them in the User Defined section of the Function Wizard (Paste Function Tool) or simply type them into a cell as you would any built-in function. The Add-In will remain installed until you return to the Add-Ins dialog and uninstall it by removing the tick from the check-box.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM