| HTML Tutorials |
|
|
| XML Tutorials |
|
|
| Browser Scripting |
|
|
| Server Scripting |
|
|
| .NET (dotnet) |
|
|
| Multimedia |
|
|
| Web Building |
|
|
| Java Tutorials |
|
|
| Programming Langauges |
|
|
| Soft Skills |
|
|
|
|
1.Do Loop
|
|
The format are as follows:
|
a) Do While condition
Block of one or more VB statements
Loop
b) Do
Block of one or more VB statements
Loop While condition
c) Do Until condition
Block of one or more VB statements
Loop
d) Do
Block of one or more VB statements
Loop Until condition
|
|
|
The following example shows the use of Do Loop in VB
|
Do while counter <=1000
num.Text=counter
counter =counter+1
Loop
or
The above example can be rewritten as
Do
num.Text=counter
counter=counter+1
Loop until counter>1000
|
|
|
2.For....Next Loop
|
|
The format is as follows:
|
For counter=startNumber to endNumber (Step increment)
One or more VB statements
Next
|
|
|
The following example shows the use of For....Next Loop in VB
|
(a) For counter=1 to 10
display.Text=counter
Next
(b) For counter=1 to 1000 step 10
counter=counter+1
Next
(c) For counter=1000 to 5 step -5
counter=counter-10
Next
|
|
Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
Keywords:
Looping in VB,
visual basic looping,
asp net looping,
visual basic vb,
vb source code,
while loop in vb,
for loop in vb,
vb asp net,
looping in excel,
looping in sql,
vb array,
vb functions,
looping asp,
vb tutorials,
vb timer,
looping code,
vb dim,
vb code,
vb msgbox,
vb controls,
vb reference,
shell in vb
|
|
| HTML Quizes |
|
|
| XML Quizes |
|
|
| Browser Scripting Quizes |
|
|
| Server Scripting Quizes |
|
|
| .NET (dotnet) Quizes |
|
|
| Multimedia Quizes |
|
|
| Web Building Quizes |
|
|
| Java Quizes |
|
|
| Programming Langauges Quizes |
|
|
| Soft Skills Quizes |
|
|
|