Page 1 of 1

EXCEL VB COPY CELL FORMULA

Posted: 13 Oct 2011, 08:41
by Mclaren
I am trying to copy a formula from on cell to a selcted range. i get an error message though.
Runtime error 1004

Autofill method of Range class failed

my code :

Code: Select all

Selection.AutoFill Destination:=Range("L2:L" & intMyCount), Type:=xlFillDefault
    Range("L2:L" & intMyCount).Select

intMyCount is based on the number of records counted.

Any ideas ?