Hi,
This is my first ever post as I'm new to VBA, so forgive any sloppy code or inadvertant breach of etiquette.
My problem is I’m not able to influence the ending row (where the loop stops) of a ‘For’ loop to reflect rows inserted during its execution.
I am writing a spreadsheet macro where there will be a different number of rows each time it is run. My macro correctly determines the final row and then runs a ‘For’ loop to process every row.
When I encounter a change of, in this case a contract number I insert a line and I then increment my counter and the variable holding the row count by one.
The problem is that the execution still stops when the current row is equal to the starting value of the variable final row – stopping short of the last row. How do / can I influence where the loop stops once I’m in the loop?
Bookmarks