Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 313
Default jump into the loop

Is it possible to jump into the loop ?

I have the module with two nested For ... Next loops:

For i = 1 to 6
....
For j = 1 to 10
...
Next j
Next i

Is it possible to store the values of i and j, close workbook and on reopen
jump inside the second loop to the place when it was finished, i.e. with i =
3 and j = 7 and to continue what was interupted before closing ? I think it
is not possible, when next is reached before seeing For first it is giving
error message, but maybe I am wrong, maybe it can be done ????

Regards,

Tony

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default jump into the loop

iFrom = 3
jFrom = 7

For i = iFrom To 6

For j = jFrom To 10

Next j
Next i

Regards,
Peter T

"Tony" wrote in message
...
Is it possible to jump into the loop ?

I have the module with two nested For ... Next loops:

For i = 1 to 6
...
For j = 1 to 10
...
Next j
Next i

Is it possible to store the values of i and j, close workbook and on

reopen
jump inside the second loop to the place when it was finished, i.e. with i

=
3 and j = 7 and to continue what was interupted before closing ? I think

it
is not possible, when next is reached before seeing For first it is giving
error message, but maybe I am wrong, maybe it can be done ????

Regards,

Tony



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default jump into the loop

Don't forget to reset jFrom to 1 after the initial loop:

iFrom = 3
jFrom = 7

For i = iFrom To 6

For j = jFrom To 10

Next j

jFrom = 1

Next i

"Peter T" wrote:

iFrom = 3
jFrom = 7

For i = iFrom To 6

For j = jFrom To 10

Next j
Next i

Regards,
Peter T

"Tony" wrote in message
...
Is it possible to jump into the loop ?

I have the module with two nested For ... Next loops:

For i = 1 to 6
...
For j = 1 to 10
...
Next j
Next i

Is it possible to store the values of i and j, close workbook and on

reopen
jump inside the second loop to the place when it was finished, i.e. with i

=
3 and j = 7 and to continue what was interupted before closing ? I think

it
is not possible, when next is reached before seeing For first it is giving
error message, but maybe I am wrong, maybe it can be done ????

Regards,

Tony




Reply
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
need to jump down 4 cells, gather data, jump another 4 [email protected] Excel Programming 2 October 6th 06 01:49 PM
jump jobra Excel Programming 3 August 22nd 05 09:15 AM
Advancing outer Loop Based on criteria of inner loop ExcelMonkey Excel Programming 1 August 15th 05 05:23 PM
Jump to the next count in a FOR Loop Hari Prasadh[_2_] Excel Programming 9 February 1st 05 04:21 PM
Jump out of Do Loop on sheet change Paul Excel Programming 2 May 14th 04 04:21 PM


All times are GMT +1. The time now is 10:40 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"