Page 102 - Excel Progamming Weekend Crash Course
P. 102

h540629 ch06.qxd  9/2/03  9:33 AM  Page 77


                                                                          SESSION



                                                                                 6










                                                        Control Constructs










               Session Checklist

               ✔ The If...Then statement
               ✔ The Select Case statement
               ✔ The Do...Loop statement
               ✔ The For...Next and For Each...Next statements



                    he VBA language includes several elements that are used to control the flow of execu-
                    tion in the program. Called control constructs, these elements fall, for the most part,
               T into the following two categories:
                   Conditional statements that execute sections of code, or not, depending on program
                   conditions. These are the If...Then and the Select Case statements.
                   Loop statements that execute sections of code zero, one, or more times, depending
                   on program conditions. These are the Do...Loop, For...Next, and For
                   Each...Next statements.

                  A good understanding of these control constructs is an essential element of VBA
               programming.
   97   98   99   100   101   102   103   104   105   106   107