YoungTurk
Mechanical
- Jul 16, 2004
- 333
I have the following code snippet, which causes the subject error:
Sheets("Nx=9.0g Fwd").Activate
Range(Cells(LastItemRow, 11), Cells(LastItemRow, 24)).Select
Selection.AutoFill Destination:=Range(Cells(LastItemRow + 1, 11), Cells(LastItemRow + 1, 24)), Type:=xlFillDefault
The odd part is I've lifted this code from another macro which works just fine:
Range(Cells(FirstAttachRow + i - 2, FirstAttachColumn), Cells(FirstAttachRow + i - 2, 100)).Select
Selection.AutoFill Destination:=Range(Cells(FirstAttachRow + i - 2, FirstAttachColumn), Cells(FirstAttachRow + i - 1, 100)), Type:=xlFillDefault
Suggestions? Explanations of why this works in one place and not another would also be useful as I am a VBA novice.
Thanks,
-Turk
Sheets("Nx=9.0g Fwd").Activate
Range(Cells(LastItemRow, 11), Cells(LastItemRow, 24)).Select
Selection.AutoFill Destination:=Range(Cells(LastItemRow + 1, 11), Cells(LastItemRow + 1, 24)), Type:=xlFillDefault
The odd part is I've lifted this code from another macro which works just fine:
Range(Cells(FirstAttachRow + i - 2, FirstAttachColumn), Cells(FirstAttachRow + i - 2, 100)).Select
Selection.AutoFill Destination:=Range(Cells(FirstAttachRow + i - 2, FirstAttachColumn), Cells(FirstAttachRow + i - 1, 100)), Type:=xlFillDefault
Suggestions? Explanations of why this works in one place and not another would also be useful as I am a VBA novice.
Thanks,
-Turk