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
Dim i As Integer
i = 5
Do While i > 0
Form1.Print "i is " & i
i = i - 1
Figure: Working of do while loop