·  VB – Syntax – Conditional Statements – Do...Until

 

- Info:

  - This tutorial shows how to use Do...Unitl conditional statements.

 

- Procedure:

  - Create VB Application Test.vb

 

    Test.vb

    Sub Main()

    

      i = 0

    

      'SIMPLE. Output is "1 2 3 4 5".

      Do

        i = i + 1

        MsgBox (i)

      Loop Until i > 4

    

      'SIMPLE. Output is "1 2 3 4 5".

      i = 0

      Do Until i > 4

        i = i + 1

        MsgBox (i)

      Loop

    

    End Sub