Copy a macro module to another workbook
- If the
Developertab is not available, do the following to display it:- Click the
Microsoft Office Button
, and then click Excel Options. - In the
Popularcategory, underTop options for working with Excel, select theShow Developer tab in the Ribboncheck box, and then clickOK.
- Click the
- To set the security level temporarily to enable all macros, do the following:
- On the
Developertab, in theCodegroup, clickMacro Security.
- In the
Macros Settingscategory, underMacro Settings, clickEnable all macros (not recommended, potentially dangerous code can run), and then clickOK.
Note To help prevent potentially dangerous code from running, we recommend that you return to any of the settings that disable all macros after you finish working with macros.
- On the
- Open the workbook that contains the module that you want to copy and the workbook that you want to copy the module to.
- On the
Developertab, in theCodegroup, clickVisual Basic. - On the
Viewmenu, clickProject Explorer
.
- Drag the module that you want to copy to the destination workbook.