Skip to main content

Do while Loop

A do while loop is a control flow statement that allows code to be executed once based on a given boolean condition. In visual basic, you can use do while loop structure when you want to repeat a set of statements of an indefinite number of times, until a condition is satisfied. Syntax:

Do  While condition
    [ statements ]
    [ Continue Do ]
    [ statements ]
    [ Exit Do ]
    [ statements ]
The Do while loop evaluate something that is true Example:
  2. Dim num As Integer
  4. Do While num 
  5. <b>Code Explanation:</b>&#13;
  6. 1. Declare num variable as Integer&#13;
  7. 2. Then we use

Add new comment