LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Running a For function in a For function

Thanks, I have posted some of the code under my initial message.

Regars,

"Chip Pearson" wrote:

I'm not clear what you are trying to do (example code would be useful), but
perhaps the following code will get you started.

Dim XEQ2 As Boolean
Dim N As Long
Dim ExitFirst As Boolean

For N = 1 To 10
Debug.Print N
' set the value of ExitFirst to True to exit out of the
' first For loop.
If ExitFirst Then
' set XEQ2 to True to run the second loop.
XEQ2 = True
Exit For
End If
Next N

If XEQ2 = True Then
For N = 11 To 20
Debug.Print N
Next N
End If


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



"C. Corodan" wrote in message
...
Hello,

I have a For function executing a loop. Inside this function, before it is
completed, I want to launch a new For function for a different loop.

Any ideas?


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
function to make a running total Function running total Excel Discussion (Misc queries) 0 February 11th 08 06:03 AM
Running a Macro from a Spreadsheet Function Patrick (GVC) Excel Worksheet Functions 2 February 10th 08 12:30 PM
VBA Function running order KevinTHFC Excel Programming 7 July 20th 07 07:24 PM
Running Ontime's procedure while another function is running? Enter The Excel Programming 1 May 11th 07 05:58 AM
Running worksheet function in VBA jmoffat[_5_] Excel Programming 1 December 10th 03 11:46 AM


All times are GMT +1. The time now is 09:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"