Creating and naming a module

We saw earlier in this chapter that macros are stored in modules. Modules that are created by the VBA system are - like macros - given default names. These are Modulel, Module2 and so on. You can create a new module for writing a macro, by selecting the Insert > Module menu item from the VBE. You can also assign more meaningful names to modules as follows:

1 From the VBE, highlight the module that you want to name in the Project Explorer window.

2 In the Properties window click the Name item (see Figure 3.15), enter the name that you want to assign to the module and press the [Enter] key. You will see the module has been renamed with your choice in the Project Explorer window.

Figure 3.15 Changing the name of a module
0 0

Post a comment