i have been through forums but this has got extraordinary members
Option Explicit
Sub AutoFillInMultipleSheets()
Dim i As Integer, k As Integer, SourceRange As Range
k = Application.WorksheetFunction.CountA(Range("B:B"))
For i = 2 To Sheets.Count Step 1 'i don't want to fill in sheets(1)
Set SourceRange = Sheets(i).Range(Cells(1, 1), Cells(2, 1))
SourceRange.AutoFill Destination:=Range(Cells(1, 1), Cells(k, 1)), _
Type:=xlFillDefault
Next i
End Sub
whenever i run it i get error 400
please members i real need your help
i can't see what is wrong with my code.
Thanks in advance.
Option Explicit
Sub AutoFillInMultipleSheets()
Dim i As Integer, k As Integer, SourceRange As Range
k = Application.WorksheetFunction.CountA(Range("B:B"))
For i = 2 To Sheets.Count Step 1 'i don't want to fill in sheets(1)
Set SourceRange = Sheets(i).Range(Cells(1, 1), Cells(2, 1))
SourceRange.AutoFill Destination:=Range(Cells(1, 1), Cells(k, 1)), _
Type:=xlFillDefault
Next i
End Sub
whenever i run it i get error 400
please members i real need your help
i can't see what is wrong with my code.
Thanks in advance.