Background
I have a spreadsheet of ticket allocations for an event. On each row of the spreadsheet is a name and the number of tickets allocated.
This is by design in VB. The limit of a for loop is calculated only once and saved in a temporary variable, just before the start of the loop. So if you change the value of the variables from which it calculates the limit, the temp variable is not affected. While this has the unexpected effect you encountered, it has the plus that the limit is only calculated once, so any methods used in this calculation is only entered once, potentially doing the loop faster.