Macro - filter - show all data
If you want to remove the filter (and filter arrows):
With worksheets("Somesheetnamehere")
.autofiltermode = false
end with
If you want to just show the data, but keep the arrows:
With worksheets("Somesheetnamehere")
if .filtermode then
'some filter is applied
.showalldata
end if
end with
Eva wrote:
Hi
I have the spreadsheet with the macro that does number of things, but I am
not using it - only somebody else. The problem is that this person uses it
then from time to time uses a filter and if data are filtered the macro
crashes. I tried use "show all data" in the macro, but it crashes when there
is not filter used.
Is there a way to change the macro so if there is a filter used then
unfilter it, but if not do not change anything?
I am still on the learning curve with the VBA.
--
Greatly appreciated
Eva
--
Dave Peterson
|