dcsimg
December 6, 2016
Hot Topics:

Basics of VB Programming

  • November 19, 2002
  • By Sam Huggill
  • Send Email »
  • More Articles »

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



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Thanks for your registration, follow us on our social networks to keep up-to-date
Rocket Fuel