A “for loop” is exiting prematurely.
You can find the loop that is giving me troubles at the line(about half way down):
“For Row = DataRow To Ptr2FDc.count + DataRow”
The debugger gets as far as just before executing the line:
.Cells(Row, ElevationIDColumn).value = Ptr2FDc(Index).ID
The code exits immediately (without executing the above line of code) to the end of the workbook.
I checked the “for” variables. DataRow IS 2 and Ptr2FDc.count IS 20
Index has a valid number of 1
In the debugger I can see the PTR2FDc collection object and it does have an object in the collection at index 1. It is the correct object.
There is no error code
Bookmarks