• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Control Structures

Control structures give your procedures more power and efficiency by allowing them to make decisions or perform repetitive tasks. Think of how powerful your VBA procedures could be if they could make decisions. If the user chose hardware from a product list, for example, you could show a graph of hardware sales. If the user chose software, you could show a software sales graph. Without a decision structure, providing for and acting on user choices wouldn't be possible.

Repetition is another common scenario in VBA procedures. If you record enough VBA procedures, you'll eventually encounter repetition. It will be in the form of a lengthy procedure that repeats the same several lines of code over and over again. Loops help you make this type of procedure much more efficient.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint