![]() |
How do I display the link location of a hyperlink?
I have an excel application that queries a web site and downloads certain
tables as html.. The tables contain hyperlinks, the location of which you can view if you mouse over them and by clicking on the cell, you can also follow these links. But what is actually displayed in the cell is the "friendly name". For future programming, I would like the actual link location displayed (either in these cells or different cells)... Does anyone know a way to do that? I've tried edit query, but excel vba learn doesn't record the link location?? |
How do I display the link location of a hyperlink?
Here is a one-liner:
Function hyp2(r As Range) As String hyp2 = r.Hyperlinks(1).Address End Function -- Gary's Student "Relic426" wrote: I have an excel application that queries a web site and downloads certain tables as html.. The tables contain hyperlinks, the location of which you can view if you mouse over them and by clicking on the cell, you can also follow these links. But what is actually displayed in the cell is the "friendly name". For future programming, I would like the actual link location displayed (either in these cells or different cells)... Does anyone know a way to do that? I've tried edit query, but excel vba learn doesn't record the link location?? |
How do I display the link location of a hyperlink?
See VBA help for Hyperlink.
e.g. Range("A1").Hyperlinks(1).Address Regards, Shah Shailesh http://in.geocities.com/shahshaileshs/ (Excel Add-ins Page) *** Sent via Developersdex http://www.developersdex.com *** |
How do I display the link location of a hyperlink?
Thank you so much... works like a charm... I had no idea.
"Gary''s Student" wrote: Here is a one-liner: Function hyp2(r As Range) As String hyp2 = r.Hyperlinks(1).Address End Function -- Gary's Student "Relic426" wrote: I have an excel application that queries a web site and downloads certain tables as html.. The tables contain hyperlinks, the location of which you can view if you mouse over them and by clicking on the cell, you can also follow these links. But what is actually displayed in the cell is the "friendly name". For future programming, I would like the actual link location displayed (either in these cells or different cells)... Does anyone know a way to do that? I've tried edit query, but excel vba learn doesn't record the link location?? |
How do I display the link location of a hyperlink?
You are very welcome.
-- Gary's Student "Relic426" wrote: Thank you so much... works like a charm... I had no idea. "Gary''s Student" wrote: Here is a one-liner: Function hyp2(r As Range) As String hyp2 = r.Hyperlinks(1).Address End Function -- Gary's Student "Relic426" wrote: I have an excel application that queries a web site and downloads certain tables as html.. The tables contain hyperlinks, the location of which you can view if you mouse over them and by clicking on the cell, you can also follow these links. But what is actually displayed in the cell is the "friendly name". For future programming, I would like the actual link location displayed (either in these cells or different cells)... Does anyone know a way to do that? I've tried edit query, but excel vba learn doesn't record the link location?? |
All times are GMT +1. The time now is 07:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com