Hello All... Thanks for the responses. Now I understand that in a "For.... Next" loop, the number of iterations is determined before the loop starts. While the loop is running, the change in the upper limit (nRows) does not have any effect on the number of iterations as it is pre-determined. I expected the incremental variable to compare its value with the upper limit at that moment for every iteration. That is not the case.
Thanks to all of you who responded to my thread.