Sub ShowAll_Records()

R

Revenue

I need to alter the code in the first sub to where if the option in
the second sub does not filter out any records, then the command
"ActiveSheet.showalldata" will not execute.


Sub ShowAll_Records()

Sheets("Input").Select
ActiveSheet.ShowAllData
End Sub


Sub HideZeros()

Range("Start").Offset(3, 0).CurrentRegion.AdvancedFilter
Action:=xlFilterInPlace, CriteriaRange:= _
Range("Criti"), Unique:=False
Range("S12").Select
End Sub
 
D

Dave Peterson

With worksheets("Input")
'to remove the filter and the arrows
.AutoFilterMode = False

'or to just show all the data and keep the arrows
If .FilterMode Then
.ShowAllData
End If
End With


You could have ignored the error, too:

on error resume next
ActiveSheet.ShowAllData
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top