Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default cell address of hyperlink

I have this code from one of you guru's (pretty sure it was Tom O.), but I do
not know how to get the cell.address of the hyperlink being tested.

'==========
Sub ChangeLink()
Dim hlink As Hyperlink
Dim s As String
Dim c As String

For Each hlink In ActiveSheet.Hyperlinks
s = hlink.Address 'is path of hyperlink doc.
If Left(s, 5) = "SPECS" Then
s = "=Hyperlink" & "(\\ENGINEERING\PRODUCTION\Qadocs\SPECS\)"
'add code to place new link in cell of hyperlink being tested
End If
Next
End Sub
'==========

All help is appreciated.

--
Regards

Rick
XP Pro
Office 2007

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default cell address of hyperlink

Hi Rick


Try this

hlink.Parent.Address



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Rick S." wrote in message ...
I have this code from one of you guru's (pretty sure it was Tom O.), but I do
not know how to get the cell.address of the hyperlink being tested.

'==========
Sub ChangeLink()
Dim hlink As Hyperlink
Dim s As String
Dim c As String

For Each hlink In ActiveSheet.Hyperlinks
s = hlink.Address 'is path of hyperlink doc.
If Left(s, 5) = "SPECS" Then
s = "=Hyperlink" & "(\\ENGINEERING\PRODUCTION\Qadocs\SPECS\)"
'add code to place new link in cell of hyperlink being tested
End If
Next
End Sub
'==========

All help is appreciated.

--
Regards

Rick
XP Pro
Office 2007

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default cell address of hyperlink

Parent! I never listend to my parents! LOL

Thank you!

--
Regards

Rick
XP Pro
Office 2007



"Ron de Bruin" wrote:

Hi Rick


Try this

hlink.Parent.Address



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Rick S." wrote in message ...
I have this code from one of you guru's (pretty sure it was Tom O.), but I do
not know how to get the cell.address of the hyperlink being tested.

'==========
Sub ChangeLink()
Dim hlink As Hyperlink
Dim s As String
Dim c As String

For Each hlink In ActiveSheet.Hyperlinks
s = hlink.Address 'is path of hyperlink doc.
If Left(s, 5) = "SPECS" Then
s = "=Hyperlink" & "(\\ENGINEERING\PRODUCTION\Qadocs\SPECS\)"
'add code to place new link in cell of hyperlink being tested
End If
Next
End Sub
'==========

All help is appreciated.

--
Regards

Rick
XP Pro
Office 2007


Reply
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
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
how do I add a 'web address' to a cell in excel with a hyperlink? sandie white New Users to Excel 1 February 8th 06 01:30 PM
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 12:17 AM.

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

About Us

"It's about Microsoft Excel"