»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 09-30-2003, 04:47 AM   #1 (permalink)
Registered User
 
Join Date: Sep 2003
Location: London
Posts: 1
Pinda is on a distinguished road
Excel Macros - Filters

I've have a tables of targets with the director
responsible for them against each target (1 director per
target), with an autofilter for the table.

On a separate sheet, I've set up macros linked to buttons
labelled with director's names, so when a director clicks
on his/her own name, it goes to the worksheet of targets
and filters the table to show the targets of that director
only. Here's the code:-


Sub CheSha()
'
' CheSha Macro
' Macro recorded 29/09/2003 by Bhupinder Rayat
'

'
Sheets("LDP Template").Select
ActiveSheet.ShowAllData
Selection.AutoFilter Field:=7, Criteria1:="Chetan Shah"
End Sub

I've recorded the macro to show all data first and then
get the required name. The trouble is when the table is
showing all data already, the macro fails because the show
all data command is not available.

Is it possible to insert an if statement within the above
code to say that if all data is showing
then "ActiveSheet.ShowAllData" does not need to be
performed.

Hope I've explained it sufficiently. Can anyone help?

Thanks in advance.

Pinda

Pinda is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 10:11 PM.