View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Data Filtering 'Show All' macro

Sub AA()
If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
End Sub

--
Regards,
Tom Ogilvy


"Andy@d2i" wrote in message
...
Using Excel 2000, I have created a macro that has the same functionality

as
the data toolbar command 'Show All' and assigned it to a command button on
the worksheet. How do I modify the macro so that it recognises that the

data
is unfiltered and prevents a run-time error '1004'message appearing?

Regards

Andy