LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default How to get Cell.Address from Hyperlink cell

Thanks!
This is much cleaner and easier (I am working with named cells).
'======
'SS_20
sS2 = Target.Range.Name.Name
'MsgBox sS2
If sS2 = "SS_20" Then
Call x2
End If
'======
--
Regards

VBA.Noob.Confused
XP Pro
Office 2007



"Juan Pablo González" wrote:

Have you tried using the _FollowHyperlink event?

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
MsgBox Target.Range.Address
End Sub

Regards,

Juan Pablo González

Rick S. wrote:
I can get the cell address from a named cell easily enough, but I can not
seem to figure how to get the cell address of a hyperlinked cell that has
been clicked.

All help is appreciated.

'======
'SS_22 (source)
'FF_S_86.Show (target)
On Error Resume Next
sS = Target.Name.Name 'get parent name of cell, target = "FF_S_86.Show"
On Error GoTo 0
If sS = "SS_22" Then 'Named Cell
Call x 'call routine to save variable in registry
FF_S_86.Show
sS = "" 'set sS to nothing
Else
sS = "" 'set sS to nothing
End If
'======
Registry Routine:
'======
Sub x()
'Begin Registry setting
sSpecLastWs = ActiveSheet.Name
SaveSetting appname:="ADM_Spec_Index", section:="WorkSheetNames", _
Key:="sSpecLastWs", setting:=sSpecLastWs
sSpecLastCell = ActiveCell.Address
SaveSetting appname:="ADM_Spec_Index", section:="WorkSheetNames", _
Key:="sSpecLastCell", setting:=sSpecLastCell
'End Registry setting
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
cell address of hyperlink Rick S. Excel Programming 2 November 14th 07 07:06 PM
How to extract a web address from a hyperlink cell? El Rebelde Excel Discussion (Misc queries) 2 November 16th 06 04:44 PM
hyperlink with cell value as part of address chevee55 Excel Programming 4 March 9th 06 07:17 PM
How make hyperlink refer to cell content rather than cell address. Omunene Excel Discussion (Misc queries) 3 March 2nd 06 01:07 AM
Reference cell address of Hyperlink Mike Fogleman Excel Programming 4 August 23rd 05 05:13 AM


All times are GMT +1. The time now is 03:46 PM.

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"