For x = 1 to Variable

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,

I'm using the line: For x = 1 to Variable, where Variable is a integer.

Now it all works well but if a certain condition happens, then Variable can
go up by 1.

Now Variable will show that it has indeed gone up by one BUT the: For x = 1
to Variable, will still go by the orginal number not the amended number.

Has anyone run into this before and know a way to get it to work the way
that I would like it to?

Thanks
 
Nevermind,

I just called the sub again then put an "Exit Sub" right behind it.

It may not be exacly the way I want it to work but as long as it works. :-)
 
hi,
I'm using the line: For x = 1 to Variable, where Variable is a integer.
This line is evaluated once.
Now it all works well but if a certain condition happens, then Variable can
go up by 1.
This change can't be reflected for the loop, because it will not
reevaluate the loop header.
Has anyone run into this before and know a way to get it to work the way
that I would like it to?
Use Roger's solution.


mfG
--> stefan <--
 
Back
Top