Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

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

Hour 14. Looping for Efficiency

What You’ll Learn in This Hour:

  • Looping a specific number of times using For...Next

  • Looping based on a condition using Do...Loop

You will often encounter situations in which you need to execute the same code statement or group of statements repeatedly. You will need to execute some of these statements a specific number of times, whereas others might need to be executed as long as a certain condition persists (an expression is True) or until a condition occurs (an expression becomes True). Visual Basic includes constructs that enable you to easily define and execute these repetitive code routines: loops. This hour shows you how to use the two major looping constructs to make your code smaller, faster, and more efficient.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint