Page 82 - Microsoft Office Excel 2003 Programming Inside Out
P. 82

Microsoft Office Excel 2003 Programming Inside Out





























                             Figure 4-9.  Creating a new module gives you a place to put your code.

                    Deleting VBA Modules

                             If a module is no longer needed within a project, you can delete it. Select the module you
                             want to remove from within the Project Explorer, and then click File, Remove Module Name.
                             Module Name will change to reflect the name of the module that is currently selected. Before
                             deleting the module, the Visual Basic Editor will ask if you want to export the module to a
                             text file, as shown in Figure 4-10. This gives you an opportunity to backup a module before
                             it is completely removed.
             Chapter 4



















                             Figure 4-10.  It’s probably a good idea to take the opportunity presented by the Export File
                             dialog box to save deleted code in a text file, just in case.

                             You can export a module at any time by clicking File, Export.
                56
             Part 2:  Visual Basic for Applications
   77   78   79   80   81   82   83   84   85   86   87