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

The Do While loop repeats a block of code as long as a condition is true.

Example:

Sub ExampleDoWhileLoop()
    Dim i As Integer
    i = 1

    Do While 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


Messages In This Thread
Do While loop in VBA - by Qomplainerz - 07-26-2023, 08:33 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Loop through columns and clear contents Qomplainerz 0 397 07-27-2023, 11:21 AM
Last Post: Qomplainerz
  Loop through worksheets and print their names in the immediate window Qomplainerz 0 410 07-27-2023, 09:42 AM
Last Post: Qomplainerz
  Loop to fill numbers in cells with VBA Qomplainerz 0 380 07-27-2023, 08:16 AM
Last Post: Qomplainerz
  Loop to display numbers in VBA Qomplainerz 0 333 07-27-2023, 07:33 AM
Last Post: Qomplainerz
  Do Until loop in VBA Qomplainerz 0 284 07-26-2023, 08:34 PM
Last Post: Qomplainerz
  For...Next loop in VBA Qomplainerz 0 323 07-26-2023, 08:32 PM
Last Post: Qomplainerz

Forum Jump:


Users browsing this thread: 1 Guest(s)