In the loop above if you want the loop to stop when it finds the value 99 you can add this line of code within the loop:
If Selection.Value = 99 Then Exit Do
Exit allows you to get out of almost anything like:
Exit Sub
Exit For
Exit Do
If Selection.Value = 99 Then Exit Do
Exit allows you to get out of almost anything like:
Exit Sub
Exit For
Exit Do
No comments:
Post a Comment