guscrouchend
Board Regular
- Joined
- May 11, 2010
- Messages
- 94
Hi,
I'm working with the following:
Sub SendtoInvoice()
With Worksheets("Invoices")
.Range("$A$18:$I" & Cells(Rows.Count, "I").End(xlUp).Row).ClearContents
End With
With Worksheets("Combined Accounts")
.Range("A1:I" & .Cells(Rows.Count, 1).End(xlUp).Row).Copy Worksheets("Invoices").Range("A18")
End With
End Sub
My problems is that the macro
sometimes
clears the contents of all cells in the Invoices worksheet, rather than only the cells from line 18 onwards.
Is there a way to change the clear contents line so that it only ever clears rows 18+?
Thanks
Angus
I'm working with the following:
Sub SendtoInvoice()
With Worksheets("Invoices")
.Range("$A$18:$I" & Cells(Rows.Count, "I").End(xlUp).Row).ClearContents
End With
With Worksheets("Combined Accounts")
.Range("A1:I" & .Cells(Rows.Count, 1).End(xlUp).Row).Copy Worksheets("Invoices").Range("A18")
End With
End Sub
My problems is that the macro


Is there a way to change the clear contents line so that it only ever clears rows 18+?
Thanks
Angus