View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Eliezer Eliezer is offline
external usenet poster
 
Posts: 12
Default Breaking out of a DO loop in Excel VBA

I have the following code:

Do Until [ ... ]
repName = wrksheet.Cells(currentInputRow, "A")

'does user want to process commissions for this
user?
If
mainForm.repsNames_frame.allOrSome_frame.someReps_ rb.Value
= True Then 'if this button is checked, user only wants
some reps
If isDesiredRep(repName) = False Then
'[ CODE NEEDS TO GO HERE TO GO TO NEXT
ITERATION IN DO-UNTIL LOOP ]
End If
Else
'all reps are desired; continue processing
regardless of whom it is
End If
Loop

Please see the point where I commented " [ CODE NEEDS TO
GO HERE ] "... How do I do some sort of continue or break
or something so that if execution hits that line, it will
go to the next iteration in the DO-UNTIL loop?

Thanks,
Eliezer