Page 25 - Excel for Scientists and Engineers: Numerical Methods
P. 25
2 EXCEL: NUMERICAL METHODS
Figure 1-1. The Visual Basic Editor window.
contain any module sheets, the Code window will be empty. To insert a module
sheet, choose Module from the Insert menu. A folder icon labeled Modules
will be inserted; if you click on this icon, the module sheet Module1 will
bedisplayed. Excel gives these module sheets the default names Modulel,
Module2 and so on.
Use the Project window to select a particular code module from all the
available modules in open workbooks. These are displayed in the Project
window (Figure 1-2), which is usually located on the left side of the screen. If
the Project window is not visible, choose Project Explorer from the View
menu, or click on the Project Explorer toolbutton $& to display it. The Project
Explorer toolbutton is the fifth button from the right in the VBA toolbar.
In the Project Explorer window you will see a hierarchy tree with a node for
each open workbook. In the example illustrated in Figure 1-2, a new workbook,
Bookl, has been opened. The node for Bookl has a node (a folder icon) labeled
Microsoft Excel Objects; click on the folder icon to display the nodes it contains-
an icon for each sheet in the workbook and an additional one labeled
Thisworkbook. If you double-click on any one of these nodes you will display the
code sheet for it. These code sheets are for special types of procedures called
automatic procedures or event-handler procedures, which are not covered in this