ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cannot move nonblank cells off the sheet (https://www.excelbanter.com/excel-programming/318192-cannot-move-nonblank-cells-off-sheet.html)

Jack Sheet

Cannot move nonblank cells off the sheet
 
On the final line of the following code I am getting run-time error 1004,
cannot move non-blank cells off the worksheet. I inserted the preceding
line in order to ensure that there ARE no nonblank cells to be shifted off.
It executes that (penultimate) line OK, but it still hangs on the final
line. There are no cell comments on the worksheet. Any ideas folks?
Thanks.

With .Worksheets("Summary")
.Range("FooterRow").Offset(1).Resize(65536 - _
.Range("FooterRow").Row).EntireRow.Delete shift:=xlUp
.Range("HeaderRow").Offset(1).EntireRow.Insert



--
Return email address is not as DEEP as it appears



Jack Sheet

Cannot move nonblank cells off the sheet
 
Solved it thanks.

"Jack Sheet" wrote in message
...
On the final line of the following code I am getting run-time error 1004,
cannot move non-blank cells off the worksheet. I inserted the preceding
line in order to ensure that there ARE no nonblank cells to be shifted

off.
It executes that (penultimate) line OK, but it still hangs on the final
line. There are no cell comments on the worksheet. Any ideas folks?
Thanks.

With .Worksheets("Summary")
.Range("FooterRow").Offset(1).Resize(65536 - _
.Range("FooterRow").Row).EntireRow.Delete shift:=xlUp
.Range("HeaderRow").Offset(1).EntireRow.Insert



--
Return email address is not as DEEP as it appears






All times are GMT +1. The time now is 10:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com