我的代码中一直出现此错误。我搜索和搜索但没有任何补救措施。我所要做的就是将3个输入输入到电子表格中,允许用户通过电子表格上的过滤器功能快速引用它们。请有人帮忙
Sub Newnew()
Workbooks("CCP Quick Reference Guide.xls").Activate
Workbooks("CCP Quick Reference Guide.xls").Worksheets("Data").Select
'Dim xx As String
'Dim yy As String
'Dim zz As String
If Cells(3, 2).Value = "" Then
'Nothing
Else
xx = Cells(3, 2).Value
Range("A6").Select
Selection.AutoFilter
ActiveSheet.Range("$A$6:$I$1000").AutoFilter Field:=1, Criteria1:=xx
End If
If Cells(3, 3).Value = "" Then
'Nothing
Else
yy = Cells(3, 3).Value
Range("A6").Select
ActiveSheet.Range("$A$6:$I$1000").AutoFilter Field:=4, Criteria1:=yy
End If
If Cells(3, 4).Value = "" Then
'Nothing
Else
zz = Cells(3, 4).Value
Range("A6").Select
ActiveSheet.Range("$A$6:$I$1000").AutoFilter Field:=5, Criterial:=zz
End If
End Sub