autofill with variables trouble
Hello--I am trying to work a macro using autofill an area with formula
R1C1 using variables. Strangely, I can get the thing to work for rows
but not for columns. I am sure I am missing something obvious. Can
anybody see what I am doing wrong?
distance, rowcount and colcount are all variables dimmed to integers
'set up the R1C1
ActiveCell.FormulaR1C1 = "=R[-" & distance & "]C"
'Autofill
ActiveCell.AutoFill _
Destination:=ActiveCell.Resize(rowcount - 4, colcount - 1 ),
Type:=xlFillDefault
I am banging my head against the wall and would love some help.
-Abe
|