0
我试图通过出现在第二列中的名称“RA”来筛选工作表。我已经构建了下面的代码,但它似乎有一个编译错误:预期:表达式后,我点击输入行“字段:= ....”。这是我想要达到的正确语法吗?谢谢。 。Excel VBA自动筛选器编译错误:预期:表达式
With CurrentSheet
Set LastAddressCurrent = .Cells(.Rows.Count, "A").End(xlUp)
LastRowCurrent = LastAddressCurrent.Row
.Range(.Cells(1, 2), .Cells(LastAddressCurrent, LastRowCurrent)).AutoFilter
Field:= 2, Criteria1:= "RA"
End If
End With
'.Range(.Cells(1,2),.Cells(LastAddressCurrent,LastRowCurrent))自动筛选字段:= 2,标准1:= “RA” “这应该是一条线。 – Mrig
或写入'....))。AutoFilter _'然后在下一行写入'Field:= 2,Criteria1:=“RA”' – Mrig
不客气。 – Mrig