Do while loop statement, Visual Basic Programming

Do While Loop Statement:

The statements contained by the do...while loop block executes till the condition given in the while is true.

The working of do...loop is elaborated with the event Form_MouseDown which is shown in the figure. Whenever you click the mouse on the form, then the event handler executes and generates the output as given in figure as shown.

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y

As Single)

Dim i As Integer

i = 5

Do While i > 0

Form1.Print "i is " & i

i = i - 1

Loop

End Sub

1236_do while loop statement.png

Figure: Working of do while loop

Posted Date: 10/9/2012 8:52:50 AM | Location : United States







Related Discussions:- Do while loop statement, Assignment Help, Ask Question on Do while loop statement, Get Answer, Expert's Help, Do while loop statement Discussions

Write discussion on Do while loop statement
Your posts are moderated
Related Questions
I have an excel list with a lot's of serial numbers that have been entered by hand from PDFs online (1-5 serial numbers per PDF). Many of the values are duplicates, wrong, or conta

Graphics Device Interface - GDI:   The GDI is a windows API. The GDI uses a set of generic graphics objects to draw to the screen, to the memory and printers. Therefore the p

Write a XML with database with book details (BOOK ID, Title, Author, subject, published Year, language, vendor, price)

Write a program to print a digital clock which displays the time for 2 hours . ..

I have an external application I open from visual studio (excel). I want to reposition where that opens (top, left).. How do I do that?


In VBScript, You create user-defined constants using the Const statement. It lets you create string or numeric constants along with meaningful names and let you to assign them lite

Adding Handlers With Class Wizard: Whenever a handler is added, the class wizard places the prototype for the message handler in the header (.H) file. It gives a skeleton hand

Deleting Records: To remove a record use the Delete method. To delete the record from the customer table follow the coding as shown below: data1.RecordSource = "Customer"

A Sub procedure is a series of VBScript statements, enclosed through Sub & End Sub statements which perform actions however don't return a value. A Sub procedure can take arguments