Solved

How to exit For Next loop prematurely

Posted on 2006-11-02
2
206 Views
Last Modified: 2010-04-23
How do I exit a For Next loop prematurely?
0
Comment
Question by:knowlton
2 Comments
 
LVL 10

Accepted Solution

by:
MrClyfar earned 500 total points
ID: 17859426
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
 
LVL 5

Author Comment

by:knowlton
ID: 17859453
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now