软件:excel
版本:2013
程式码如下
Dim maxR As Long
Dim sh As Worksheet
Set sh = ActiveSheet
maxR = 2
While sh.Cells(maxR, 1).Value <> ""
maxR = maxR + 1
Wend
maxR = maxR - 1
ref1 = "AP2:BT" & maxR ‘→要复制的范围
Selection.AutoFill Destination:=Range(ref1) =>错误点
MsgBox ("完成!")
一直找不到怎么解决,恳请大大指点