logandiana
Board Regular
- Joined
- Feb 21, 2017
- Messages
- 107
I've got code that takes a sheet copies it.
Then uses
To delete everything under the last row (usually around 700 rows).
Then the workbook is saved.
When I go check the saved workbook after the procedure. I've got my data but after the 700 or so rows of data, I've got blank rows all the way down to the bottom (1048576)
Not sure why this is happening this time in particular as this method has always worked before.
BUT here's the kicker.
When I manually open the workbook. Go to the 1st blank row after the last row of data.
I select the row, then do a ctrl shift down, right click and Delete. All the empty rows appear to delete.
I save and close. I have done this method without problem before as well.
But I go back into the workbook and the blank rows are still there.
Not sure what is happening.
Then uses
VBA Code:
With billPO
LR1 = billPO.Cells(Rows.Count, 3).End(xlUp).Row
.Range(.Rows(LR1 + 1), .Rows(LR1 + 1).End(xlDown)).Delete
End With
Then the workbook is saved.
When I go check the saved workbook after the procedure. I've got my data but after the 700 or so rows of data, I've got blank rows all the way down to the bottom (1048576)
Not sure why this is happening this time in particular as this method has always worked before.
BUT here's the kicker.
When I manually open the workbook. Go to the 1st blank row after the last row of data.
I select the row, then do a ctrl shift down, right click and Delete. All the empty rows appear to delete.
I save and close. I have done this method without problem before as well.
But I go back into the workbook and the blank rows are still there.
Not sure what is happening.