Error Auto Fill Method of Range Class Failed
Hello All:
I have been using this code in one other part of my spreadsheet which
has same conditions and it works for some reason when I use this in
another part of my spreadsheet it is giving me an error." Auto Fill
Method of Range Class Failed". I am a bit confused as to why this
works in one area and not in the other. The conditions are the same;
even the formula is the same different range but the same.
----------------------------------
Sub TransferPa_dwrInfo()
' Transfer information from student tab to PA-DWR Detail Tab
' Ardy 1-10-2007
Dim LastRow As Long
' InsertInfoTransferFormula_1 ' Insert the formula for transfer for the
firsr row(Module 1)
' This places the Formula on the first row C3:AH3. The formula is
'ActiveCell.FormulaR1C1 = "=INDIRECT(""'""&RC[-2]&""'!C24"")"
'This by itself works
With ActiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
.Range("C3:AH44").AutoFill Destination:=.Range("C3:AH" & LastRow), _
Type:=xlFillDefault
End With
End Sub
--------------------------------------
|