I have this block in my code:
For Each CurCell In iStateRange
ActiveCell.Formula = "='[MAY 2005.xls]IB'!$G$" & iRow
iRow = iRow + 18
ActiveCell.Offset(1, 0).Select
Next
This works perfectly (almost), but when it gets to the last CurCell in iStateRange, it does not enter the data. I changed the above to this:
For Each CurCell In iStateRange
ActiveCell.Formula = "='[MAY 2005.xls]IB'!$G$" & iRow
iRow = iRow + 18
ActiveCell.Offset(1, 0).Select
Next
ActiveCell.Formula = "='[MAY 2005.xls]IB'!$G$" & iRow
And now everything works fine. I wanted to see what someone thought, because I'm sure this is not the best way to do it.
DejaVu
Bookmarks