Serving the Quantitative Finance Community

 
User avatar
challenged
Topic Author
Posts: 1
Joined: February 24th, 2003, 3:26 pm

Use VBA to determine address of hyperlink

August 26th, 2003, 2:39 pm

In Excel, I have a hyperlink in which the displayed text does not correspond with the hyperlink address. If you hold the cursor over the hyperlink, the hyperlink address is displayed in the tool tip. Using VBA I would like to programmatically determine the hyperlink address.For example,Cell A1 contains the text CLICK HERE. CLICK HERE is a hyperlink to an internet location.Help!
 
User avatar
luizvs
Posts: 0
Joined: May 23rd, 2003, 6:13 pm

Use VBA to determine address of hyperlink

August 29th, 2003, 7:44 pm

Have u try this code?~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Range("A1").SelectActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _ "http://www.wilmott.com.br/", TextToDisplay:="CLICK HERE"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
User avatar
challenged
Topic Author
Posts: 1
Joined: February 24th, 2003, 3:26 pm

Use VBA to determine address of hyperlink

August 31st, 2003, 10:02 pm

Thanks for the advice. I think that your solution is going in the opposite direction. I don't want to add a hyperlink, I want to determine what the hyperlink is. I found a UDF, Extract Hyperlink Address From Cell, at http://www.ozgrid.com/News/excel-named-ranges.htm that works well.Thanks again for your assistance.