Basics of VB Programming
The Do..Loop is a good way to loop a certain condition depending on different criteria. e.g.
Do Msgbox "Hi" Loop
The problem with this code is that it will keep on going forever. You can of course set certain conditions. e.g.
Dim i As Integer i=10 Do While i>0 i=i-1 Loop
This code will count down from 10 and when i is 0, the loop ends. Another use of this loop is:
Dim i As Integer i=10 Do Until i=0 i=i-1 Loop
This code will continue until i is 0, and then stop.
Page 5 of 6