我在宏中激活了对excel文件的自动过滤。运行代码时,出现以下错误消息:
运行时错误438,对象不支持此属性或方法
我试图通过 F8 逐步运行宏,似乎下面的这一行生成了此错误:
Range(ActiveCell, ActiveCell.End(xlDown)).Paste
我希望我的宏执行以下操作:
如果有人可以帮助我,那就太好了。
Sub fuelstep4ArvalBIF()
Application.ScreenUpdating = False
Range("A1").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$AF$3000").AutoFilter Field:=25, Criteria1:=Array( _
"21.00", "21", "19.00", "19", "5.50", "5.5", "13.00", "13"), Operator:=xlFilterValues
Call FirstVisibleCellAA
Range(ActiveCell, ActiveCell.End(xlDown)).Copy Call FirstVisibleCellK
Range(ActiveCell, ActiveCell.End(xlDown)).Paste Call FirstVisibleCellJ
ActiveCell.Value = "J0" ActiveCell.Copy Range(ActiveCell,
ActiveCell.End(xlDown)).Paste
End Sub
Sub FirstVisibleCellK()
With ActiveSheet.AutoFilter.Range
Range("K" & .Offset(1, 0).SpecialCells(xlCellTypeVisible)(1).Row).Select
End With
End Sub
Sub FirstVisibleCellAA()
With ActiveSheet.AutoFilter.Range Range( _
"AA" & .Offset(1, 0).SpecialCells(xlCellTypeVisible)(1).Row).Select
End With
End Sub
Sub FirstVisibleCellJ() With ActiveSheet.AutoFilter.Range
Range("J" & .Offset(1, 0).SpecialCells(xlCellTypeVisible)(1).Row).Select
End With End Sub
预先感谢您的帮助。