r/visualbasic • u/Avantgardedane • Oct 20 '16
Reasoning behind backwards loop
I am running some code to look through our bank and match it to our accounting, and i am using a for i=m to 1...next loop - step -1. When i change it to go forward ( step+1) it messes everything up. I've seen this before, but why?
5
Upvotes
2
u/Avantgardedane Oct 20 '16
I was wondering, if there was a general reasoning behind looping backwards, but i think i found it. It is because i delete rows, and when i go forward, it messes up my count :)