Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Do Until loop in VBA
#1
Description:

The Do Until loop repeats a block of code until a condition becomes true.

Example:

Sub ExampleDoUntilLoop()
    Dim i As Integer
    i = 1

    Do Until i > 5
        MsgBox "Iteration: " & i
        i = i + 1
    Loop
End Sub
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Loop through columns and clear contents Qomplainerz 0 395 07-27-2023, 11:21 AM
Last Post: Qomplainerz
  Loop through worksheets and print their names in the immediate window Qomplainerz 0 406 07-27-2023, 09:42 AM
Last Post: Qomplainerz
  Loop to fill numbers in cells with VBA Qomplainerz 0 379 07-27-2023, 08:16 AM
Last Post: Qomplainerz
  Loop to display numbers in VBA Qomplainerz 0 331 07-27-2023, 07:33 AM
Last Post: Qomplainerz
  Do While loop in VBA Qomplainerz 0 304 07-26-2023, 08:33 PM
Last Post: Qomplainerz
  For...Next loop in VBA Qomplainerz 0 321 07-26-2023, 08:32 PM
Last Post: Qomplainerz

Forum Jump:


Users browsing this thread: 8 Guest(s)