How can an existing macro be inserted into a new excel workbook?
I want to create a new WorkBook
(with vba), and then place an existing macro into the new WorkBook.
Open both the workbook that contains the macro you want to copy, and the workbook where you want to copy it. On the Developer tab, click Visual Basic to open the Visual Basic Editor. , or press CTRL+R . In the Project Explorer pane, drag the module containing the macro you want to copy to the destination workbook.
Go to Files > Options > Add-in and select the above Excel file/Macro from the list of Inactive Application Add-ins & Click Go. This step makes the function/macro available for all workbook.
The two options that JMax mentioned:
"hard way"
"easy way"
We would need to see a sample of your workbook to provide further detailed help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With