I have a Do while loop and within it I have a few for loops and if conditional statements. Eg.
Do While condition
statement
if condition then
statement
for i=0 to count
statement
next i
statement
etc etc
Loop
I need the for loops and if conditional statements in my loop. However when I compile I get an error “Compile Error: Loop without Do”
Why is this so? Is this not allowed in VBA?
Do While condition
statement
if condition then
statement
for i=0 to count
statement
next i
statement
etc etc
Loop
I need the for loops and if conditional statements in my loop. However when I compile I get an error “Compile Error: Loop without Do”
Why is this so? Is this not allowed in VBA?