philfer
02-22-2018, 08:31 AM
Hi,
I'm no sure what is wrong with the below but I keep getting a 1004 error
With Worksheets("Inventory Extract")
lastrow = .Range("A" & .Rows.Count).End(xlUp).Row
lastcol = .Cells(1, .Columns.Count).End(xlToLeft).Column
.Range(Cells(2, 1), Cells(lastrow, lastcol)).Clear
End With
the lastrow and lastcol work and have values of 1106 and 42 but the next line gives the error
Thanks
Phl
I'm no sure what is wrong with the below but I keep getting a 1004 error
With Worksheets("Inventory Extract")
lastrow = .Range("A" & .Rows.Count).End(xlUp).Row
lastcol = .Cells(1, .Columns.Count).End(xlToLeft).Column
.Range(Cells(2, 1), Cells(lastrow, lastcol)).Clear
End With
the lastrow and lastcol work and have values of 1106 and 42 but the next line gives the error
Thanks
Phl