G
Guest
Hi
I currently autofill on mulitple spreatsheets in a workbook. My problem is,
that if there is nothing to fill in a particular sheet (the sheets are auto
populated by another macro) then the macro gives me an error message.
My question is, what can I add to the code below for it to skip the autofill
if there is nothing to fill?
With Worksheets("Complete PVC")
LastRow = .Cells(Rows.Count, "B").End(xlUp).Row
.Range("A2").AutoFill Destination:=.Range("A2:A" & LastRow),
Type:=xlFillDefault
End With
Thanks in advance for any help anyone can offer.
Anita
I currently autofill on mulitple spreatsheets in a workbook. My problem is,
that if there is nothing to fill in a particular sheet (the sheets are auto
populated by another macro) then the macro gives me an error message.
My question is, what can I add to the code below for it to skip the autofill
if there is nothing to fill?
With Worksheets("Complete PVC")
LastRow = .Cells(Rows.Count, "B").End(xlUp).Row
.Range("A2").AutoFill Destination:=.Range("A2:A" & LastRow),
Type:=xlFillDefault
End With
Thanks in advance for any help anyone can offer.
Anita