- Katılım
- 12 Mart 2009
- Mesajlar
- 119
- Excel Vers. ve Dili
- Office 365 - Ingilizce
Merhaba,
Asagidaki kod son satirda Run-time error '1004': AutoFill method Range class failed hatasi veriyor. Nasil duzeltebilirim acaba ?
Asagidaki kod son satirda Run-time error '1004': AutoFill method Range class failed hatasi veriyor. Nasil duzeltebilirim acaba ?
Kod:
Public Sub Autofiller()
Dim lastDate, lastRowFilled As Long
Range("A1").Select
lastDate = Range(Selection, Selection.End(xlDown)).Rows.Count
lastRowFilled = Range("C1").CurrentRegion.Rows.Count
Set SourceRange = Range("A" & lastDate)
Set fillRange = Range(Cells(lastDate, 1), Cells(lastRowFilled, 1))
SourceRange.AutoFill Destination:=fillRange