How do I exit 2 loops?
I want to be able to exit the Do loop and the outer For loop. Is that possible? How do I do that?
For i = i To UBound(tContents)
s = Trim(tContents(i))
'Check for end of file
If Mid(s, 1, 5) = "*SPC*" Then
ReDim BlockList(30)
Do
BlockList(BlockLines) = s
BlockLines += 1
i += 1
s = Trim(tContents(i))
Loop Until (Mid(s, 1, 5) = "*SPC*")
i -= 1 'Makes sures that I am at the line before the next BLOCK
End If
I want to be able to exit the Do loop and the outer For loop. Is that possible? How do I do that?
For i = i To UBound(tContents)
s = Trim(tContents(i))
'Check for end of file
If Mid(s, 1, 5) = "*SPC*" Then
ReDim BlockList(30)
Do
BlockList(BlockLines) = s
BlockLines += 1
i += 1
s = Trim(tContents(i))
Loop Until (Mid(s, 1, 5) = "*SPC*")
i -= 1 'Makes sures that I am at the line before the next BLOCK
End If