excel vba隐藏过滤器箭头?
我使用以下脚本根据单元格值筛选行。 该脚本工作良好,但我试图摆脱那些恼人的过滤箭头显示。我尝试了以下方法,但仍显示:excel vba隐藏过滤器箭头?,excel,vba,filter,Excel,Vba,Filter,我使用以下脚本根据单元格值筛选行。 该脚本工作良好,但我试图摆脱那些恼人的过滤箭头显示。我尝试了以下方法,但仍显示: Sub DateFilter() Dim nRow As Range Dim toSearch As Range 'hide dialogs Application.ScreenUpdating = False 'filter for records that have June 11, 2012 in column 3 If ActiveSh
Sub DateFilter()
Dim nRow As Range
Dim toSearch As Range
'hide dialogs
Application.ScreenUpdating = False
'filter for records that have June 11, 2012 in column 3
If ActiveSheet.Range("B6").Value = "" And ActiveSheet.FilterMode = True Then
ActiveSheet.ShowAllData
Else
Set toSearch = Range("A9:E13")
'detect row that matches criteria:
Set nRow = toSearch.Find(ActiveSheet.Range("B6").Value)
If Not (nRow Is Nothing) Then
ActiveSheet.Range("E9:A13").AutoFilter Field:=nRow.Column, VisibleDropDown:=False, Criteria1:="*" & nRow.Value & "*"
End If
End If
Application.ScreenUpdating = True
End Sub
请有人告诉我哪里出了问题。提前感谢我知道这是一篇老文章,但可能有人能够使用这段代码
Range("A3:H3").Select
Selection.AutoFilter
Selection.AutoFilter Field:=4, VisibleDropDown:=False
Selection.AutoFilter Field:=7, VisibleDropDown:=False
这将为那些有多个标题行的人放置“A3:H3”中的过滤器下拉箭头
然后,它将删除第4列和第7列(D&G)中的下拉箭头,以便只过滤A-C、E-F和H列
希望这能澄清一些关于独特过滤器的问题。在使下拉列表不可见之前,您是否尝试过清除过滤器?@Gary's Student yes首先我想您需要为每个要隐藏箭头的字段设置
VisibleDropDown
参数。看见