For … Next:
For i = 1 To N Step Inc
Statement1
Statement2
……………..
……………..
StatementN
Next
MsgBox (i) ‘ Displays 1 to 50 Numbars
Next
MsgBox (i) ‘ Displays Even Numbers In Between 1 to 50
Next
MsgBox (i) ‘ Displays Odd Numbers In Between 1 to 50
Next
For Each … Next:
For Each I in Var
Statement1
Statement2
……………..
……………..
StatementN
Next
MsgBox (i) ‘ Displays 1, 2, 3
Next
MsgBox (i) ‘ Displays Array Elements in Arr
Next
Do While … Loop :
Do [While | Until Expression]
Statement1
Statement2
……………..
……………..
StatementN
[Exit Do]
iCount = iCount + 1 ‘ Increment Counter.
MsgBox(iCount) ‘ Displays Numbers from 1 to 19
iCount = iCount + 1 ‘ Increment Counter.
MsgBox(iCount) ‘ Displays Numbers from 1 to 20
Do … Loop While:
Do
Statement1
Statement2
……………..
……………..
StatementN
[Exit Do]
Loop [While | Until Expression]
iCount = iCount + 1 ‘ Increment Counter.
MsgBox(iCount) ‘ Displays Numbers from 1 to 19
Loop While iCount < 20 ‘Repeats until False
iCount = iCount + 1 ‘ Increment Counter.
MsgBox(iCount) ‘ Displays Numbers from 1 to 20
While … Wend:
While Expression
Statement1
Statement2
……………..
……………..
StatementN
[Exit Do]
WEnd
iCount = iCount + 1 ‘ Increment Counter.
MsgBox(iCount) ‘ Displays Numbers from 1 to 19
Exit Statement:
No comments:
Post a Comment