VBA自动填充错误1004范围类的自动填充方法失败

时间:2017-03-13 16:58:33

标签: excel vba excel-vba autofill

我在sheet1中有以下数字

A1:10
A2:11
A3:24
A4:59
A5:19
在sheet2中的

我和自动填充宏一样复制 代码编写

Sub
        Dim lRow As Long
        Dim fRow As Long
        Sheets("Sheet1").Select
        lRow = Cells(Rows.Count, 1).End(xlUp).Row
        Sheets("Sheet2").Select
        fRow = Cells(Rows.Count, 1).End(xlUp).Row
        Sheets("Sheet2").Range("A" & fRow).Select
        Sheets("sheet2").Range("A" & fRow).AutoFill Destination:=Range("A" & fRow, "A" & lRow), Type:=xlFillDefault

"运行时错误1004范围类的自动填充方法失败"

0 个答案:

没有答案