Friday, February 18, 2011

Do While and For each loops.

This code shows Do While First

  • The Do While...Loop is used to execute statements until a certain condition is met. The following Do Loop counts from 1 to 100.
Dim number As Integer
number = 1
Do While number <= 100
number = number + 1
Loop
Do (While last)
For
 For  n = 1 To 3
            MsgBox(n)
        Next
Her is an example of a for each loop
    For Each singleChar In siteName
            MsgBox(singleChar)
        Next

No comments:

Post a Comment