LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 587
Default VBA - Hyperlink Function Combined with Find

sorry, it's not "Target.Address(0, 0)" but "Target.Range.Address(0, 0)"


Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Select Case Target.Range.Address(0, 0)
Case Is = "A1": Application.Goto Worksheets("Sheet2").Range("A10")
Case Is = "A2": Application.Goto Worksheets("Sheet2").Range("A20")
Case Is = "A3": Application.Goto Worksheets("Sheet2").Range("A30")
End Select
End Sub


--
isabelle


Le 2012-09-06 22:34, isabelle a écrit :
also you can use the same event for multiple links


Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Select Case Target.Address(0, 0)
Case Is = "A1": Application.Goto Worksheets("Sheet2").Range("A10")
Case Is = "A2": Application.Goto Worksheets("Sheet2").Range("A20")
Case Is = "A3": Application.Goto Worksheets("Sheet2").Range("A30")
End Select
End Sub


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
More on Combined IF Function Elaine Excel Worksheet Functions 2 April 9th 09 08:54 PM
Find earliest date combined with status Ixtreme Excel Discussion (Misc queries) 2 August 28th 07 04:14 AM
lookup combined with search to find keywords and then assign a cat jalbert1975 Excel Programming 7 September 22nd 06 07:45 PM
vlookup combined with AND-function martho Excel Worksheet Functions 1 January 20th 06 12:49 PM
Find min/max in 2 combined columns Tammi Excel Worksheet Functions 3 June 22nd 05 08:19 PM


All times are GMT +1. The time now is 09:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"