C
clawdogs
Anyone know how to remove column filters via VB code? I'm trying to
code for an automated macro.. Thanks in advance..
code for an automated macro.. Thanks in advance..
clawdogs said:Anyone know how to remove column filters via VB code? I'm trying to
code for an automated macro.. Thanks in advance..
Have you tried using the macro recorder while manually making the
changes you are interested in and then examining the code?
Anyone know how to remove column filters via VB code? I'm trying to
code for an automated macro.. Thanks in advance..
Have you tried using the macro recorder while manually making the
changes you are interested in and then examining the code?
yes, that won't work if filters are already off. it will then include
filters
The obvious recommendation would then be.... do it a second time after it
includes filters and you will have the code to remove them ???
End With 'ActiveSheetWith ActiveSheet
If .FilterMode Then .AutoFilter '//turn it off
Guys, thanks a bunch!Saved from a previous post:
If turn the autofilter off means remove all the arrows and show all the data:
dim wks as worksheet
set wks = worksheets("Somesheetname")
wks.autofiltermode = false
If turn off just means that you show all the data and keep the arrows:
dim wks as worksheet
set wks = worksheets("Somesheetname")
with wks
'show all the data
If .FilterMode Then
.ShowAllData
End If
end with