Hi,
Could you please show me a macro which can perform the following function without using on error resume next?
When there is an advanced filter, clear it.
If there is no advanced filter then fine.
Thanks
Hi,
Could you please show me a macro which can perform the following function without using on error resume next?
When there is an advanced filter, clear it.
If there is no advanced filter then fine.
Thanks
I am not familiar with Advanced Filters but this might do it.
From:
http://spreadsheetpage.com/index.php...er_dialog_box/
Sub ShowAdvancedFilterDialog() ' Delete names On Error Resume Next With ActiveWorkbook .Names("_FilterDatabase").Delete .Names("Criteria").Delete .Names("Extract").Delete End With On Error GoTo 0 ' Display the dialog box Application.Dialogs(xlDialogFilterAdvanced).Show End Sub
Perhaps
[VBA]With ActiveSheet
If .FilterMode And Not .AutoFilterMode Then
.ShowAllData
End If
End With
[/VBA]
As it hides rows, why not just use
[VBA]Activesheet.UsedRange.Rows.Hidden = False[/VBA]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
xld
I used Advancedfilter.
Then I wanted to remove the filter.
The following code showed some.
But one row was hidden.Cells.AutoFilter
I tried the code showalldata and still that row was hidden.
Your code did the job and that hidden row became visible.
Many Thanks.
Last edited by pmyk; 10-31-2019 at 12:20 AM. Reason: To include Suggested persons name
Good to see that you got help from an old post, and good to see someone who knows how to search for previous answers
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber