alivenwell
10-17-2007, 08:29 AM
Hi all,
I have a little problem with my vb code, I am trying to autofill a formula within a range.
here is my code:
FSun = Cells.Find("Sunday", ActiveCell, xlValues, xlPart, xlByRows, xlNext, False).Select
FSunrow = ActiveCell.Row
FSuncol = ActiveCell.Column
LastConcatrow = GetLast(ActiveSheet, True)
LastConcatcol = GetLast(ActiveSheet, False)
LastConcatCell = Cells(LastConcatrow, LastConcatcol).Select
fzero = Cells(FSunrow + 2, FSuncol).Select
ActiveCell.FormulaR1C1 = "=CONCATENATE('CCL (2)'!RC&CCL!RC)"
'it is this bit that comes up with an error
Range(fzero).AutoFill Destination:=Range("fzero", "LastConcatCell")
Are there any suggestions? thanks.
I have a little problem with my vb code, I am trying to autofill a formula within a range.
here is my code:
FSun = Cells.Find("Sunday", ActiveCell, xlValues, xlPart, xlByRows, xlNext, False).Select
FSunrow = ActiveCell.Row
FSuncol = ActiveCell.Column
LastConcatrow = GetLast(ActiveSheet, True)
LastConcatcol = GetLast(ActiveSheet, False)
LastConcatCell = Cells(LastConcatrow, LastConcatcol).Select
fzero = Cells(FSunrow + 2, FSuncol).Select
ActiveCell.FormulaR1C1 = "=CONCATENATE('CCL (2)'!RC&CCL!RC)"
'it is this bit that comes up with an error
Range(fzero).AutoFill Destination:=Range("fzero", "LastConcatCell")
Are there any suggestions? thanks.