While - Wend

There is also a While Loop although this is less popular than the Do Loop
This is available for backwards compatibility and should be replaced with DO While Loop
This logic is identical to the Do-While loop.
There is no Exit While in VBA

Public Sub WhileLoop() 
Dim icount As Integer
   icount = 1
   While (icount < 5)
'do something
      icount = icount + 1
End Sub

© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited TopPrevNext