Changes

Jump to: navigation, search

Visual Basic For Loops

No change in size, 19:34, 13 August 2007
no edit summary
== Creating a Visual Basic For Loop ==
The Visual Basic ''For'' loop is ideal for situations wheer where a task needs to be performed a specific number of times. For example, perhaps a value needs to be added to a variable 100 times. A Visual Basic ''For'' loop consists of a header, a code block and a next statement. The header contains information about how many times the loop is to be performed, the code block contains the statements to be executed on each iteration and the next statement sends the loop back to the header to repeat. The syntax of a ''For'' loop is as follows:
'''For''' ''counterVariable'' '''=''' ''fromValue'' '''To''' ''toValue''<br>

Navigation menu