A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Links and Linking
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hyperlinks and filters



 
 
Thread Tools Display Modes
  #1  
Old October 2nd, 2003, 03:12 PM
Bob P
external usenet poster
 
Posts: n/a
Default Hyperlinks and filters

Is there any way that I can set-up a hyperlink to a different worksheet in
the existing file and get a filter to run on that sheet automatically?

Thanks,
Bob.


  #2  
Old October 3rd, 2003, 07:39 AM
Bill Manville
external usenet poster
 
Posts: n/a
Default Hyperlinks and filters

Bob P wrote:
Is there any way that I can set-up a hyperlink to a different worksheet in
the existing file and get a filter to run on that sheet automatically?


With the filter depending on the hyperlink?
Possibly using the Worksheet_FollowHyperlink event if you are using Excel
2000 or later.

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Dim stChoice As String
' assume the hyperlink displays the item on which the destination is to be
filtered
stChoice = Target.Parent.Value
Application.EnableEvents = False ' stop recursive call
Target.Follow
Application.EnableEvents = True
' assume column 1 to be filtered
ActiveCell.AutoFilter 1, stChoice
End Sub

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup

 




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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:41 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.