Hello,

I got a problem.

I have a sub2(i,n) which consists of a For Next statement.

sub2(i,n)
For l(i)=1 to n
.......
......
i=i+1
n=n-1
Call sub2(i,n)
Next
End sub

So i get nested for next loops.

So when it has called all the same subs within sub2 he has to loop through all those for next statements.

The problem is that it doesn't use the corresponding i and n in the different loops anymore which I passed as value. Instead he uses the last values passed.

How can i tackle this?

Any help greatly appreciated...

Kind regards,

Gertjan Oonk