• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

How to exit For Next loop prematurely

How do I exit a For Next loop prematurely?
0
Tom Knowlton
Asked:
Tom Knowlton
1 Solution
 
Jason EvansSenior Software DeveloperCommented:
Hi there.

You can use Exit For   eg:

For i = 1 To 10

 '// Do something....

Exit For '// Leave the For loop early.

 '// Do something else....
Next

Hope this helps.
Jas.
0
 
Tom KnowltonWeb developerAuthor Commented:
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now