Page 48 - Excel Progamming Weekend Crash Course
P. 48

d540629 ch02.qxd  9/2/03  9:27 AM  Page 23




                  Session 2 — The VBA Code Editor                                         23


                    The Immediate Window

                       The Immediate Window is used to display output from the Debug.Print state-
                       ment when the program is running. To display or hide this window, select
                       View ➪ Immediate Window or press Ctrl+G. You’ll see how Debug.Print is used
                       in later sessions.























                    Figure 2-5 The Property Window showing the properties of a worksheet
                  The Properties Window has two tabs that enable you to view the object’s properties listed
               either alphabetically (as in the figure) or grouped by category. The left column displays the
               property names, and the right column displays the value. Select a property name to change
               it. Properties fall into four categories:
                   Boolean properties that are either True or False. Select from the drop-down list
                   or double-click the property name to toggle its value.
                   Enumerated properties that must be one of a defined set of values. Select from
                   the drop-down list.
                   Properties that are set using a dialog box. Click the ellipses in the value column
                   to display the corresponding dialog box.
                   Unrestricted properties that can take any value. Click in the value column and
                   edit the property value.



               The VBA Editor Menus

               The VBA Editor has a fairly involved menu system (see Table 2-1). Many of these menu com-
               mands are mentioned as needed throughout the book — for example, the Debug menu com-
               mands are covered in the Session 25. A few commands are for rarely used advanced features
               that are beyond the scope of this book. Others, such as the commands on the Window
               menu, should be familiar to anyone who has used Windows programs before and therefore
               are not covered here.
   43   44   45   46   47   48   49   50   51   52   53