| | Product Information Help and How-to Training Templates Related Products and Technologies Support and Feedback Technical Resources Additional Resources | Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.
Copy a macro module to another workbook
- If the Developer tab is not available, do the following to display it:
- Click the Microsoft Office Button
, and then click Excel Options. - In the Popular category, under Top options for working with Excel, select the Show Developer tab in the Ribbon check box, and then click OK.
Note The Ribbon is a component of the Microsoft Office Fluent user interface.
-
To set the security level temporarily to enable all macros, do the following:
- On the Developer tab, in the Code group, click Macro Security.

- In the Macros Settings category, under Macro Settings, click Enable all macros (not recommended, potentially dangerous code can run), and then click OK.
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.
- Open the workbook that contains the module (module: A collection of declarations, statements, and procedures stored together as one named unit. There are two types of modules: standard modules and class modules.) that you want to copy and the workbook that you want to
copy the module to.
- On the Developer tab, in the Code group, click Visual Basic.
- On the
View menu, click
Project Explorer
.
- Drag the module that you want to copy to the destination
workbook.
|