Главная » Excel Macros For Dummies читать онлайн | страница 48

Читать книгу Excel Macros For Dummies онлайн

48 страница из 60

Follow these steps to manually add a new VBA module to a project:

1 Select the project’s name in the Project Explorer.

2 Choose Insert ⇒ Module.

Or you can

1 Right-click the project’s name.

2 Choose Insert ⇒ Module from the shortcut menu.

The new module is added to a Modules folder in the Project Explorer (see Figure 2-3). Any modules you create in a given workbook are placed in this Modules folder.


ssss1 Code modules are visible in the Project Explorer in a folder called Modules.

If you want to change the name of your module, select the module in the Project Explorer and press F4 to show the Properties window. Modules only have one property, Name, so it's easy to find where to change it.

Removing a VBA module

You may want to remove a code module that is no longer needed. To do so, follow these steps:

1 Select the module’s name in the Project Explorer.

2 Choose File ⇒ Remove xxx, where xxx is the module name.

Or

1 Right-click the module’s name.

2 Choose Remove xxx from the shortcut menu.

Правообладателям