Compile error 'named argument not found'

倾然丶 夕夏残阳落幕 提交于 2020-06-18 12:05:35

问题


Excel 2007

Sub Filtered_data_on_othersheet()
    Dim i As Integer
    Dim xx As String

    For i = 1 To 3
        On Error Resume Next
        xx = Sheets("main").Range("K" & i).Value
        Range("A1").CurrentRegion.AutoFilter field:=1, Criterial:=xx
        Range("A1").CurrentRegion.Cells.SpecialCells(xlCellTypeConstants).Copy Destination:=Sheets(xx).Range("A1")

    Next
    Err.Clear
    Range("A1").CurrentRegion.AutoFilter
End Sub

回答1:


Simple mistake. It should be Criteria1 not Criterial

Use the number 1 instead of the letter l.



来源:https://stackoverflow.com/questions/33070010/compile-error-named-argument-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!