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

Creating Sub and Function Procedures




















                               3  Click Insert, Procedure to display the Add Procedure dialog box.
                               4  Type the name of your procedure in the Name box.
                               5  Select the Sub option button.
                               6  Click OK.


                             Note  There are other options available to you in the Add Procedure dialog box—you’ll
                             learn about those possibilities a little later in this chapter.

                             After you finish the preceding procedure, the outline of a procedure appears in the active
                             code module, as shown in Figure 5-1.












                                                                                                             Chapter 5








                             Figure 5-1.  As soon as you click OK in the Add Procedure dialog box, the skeleton of your
                             new procedure appears in the active code module.








                                                                                                        87
                                                                                        Part 2:  Visual Basic for Applications
   108   109   110   111   112   113   114   115   116   117   118