|
Loop Structures |
|
|
'Example Do Until DefResp = vbNo MyNum = Int (6 * Rnd + 1) ' Generate a random integer between 1 and 6. DefResp = MsgBox (MyNum & " Do you want another number?", vbYesNo) Loop
'Example Do MyNum = Int (6 * Rnd + 1) ' Generate a random integer between 1 and 6. DefResp = MsgBox (MyNum & " Do you want another number?", vbYesNo) Loop While DefResp = vbYes
'Example Dim Counter Counter = 0 ' Initialize variable. While Counter < 20 ' Test value of Counter. Counter = Counter + 1 ' Increment Counter. DL.AddComment Counter Wend ' End While loop when Counter > 19
'Example For I = 1 To 5 For J = 1 To 4 For K = 1 To 3 DL.AddComment I & " " & J & " " & K Next Next Next
|