View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Differentiating Text from Hyperlink Data type

refer to the hyperlinks

Sub GetAddress()
Dim hlink As Hyperlink
Dim rng As Range
For Each hlink In ActiveSheet.Hyperlinks
Set rng = hlink.Range
rng.Offset(0, 1).Value = hlink.Address
Next

End Sub

--
Regards,
Tom Ogilvy



"Sathya" wrote in message
...
Hi Guys,
I have a little problem using hyperlinks in Excel
worksheets.
I have a column with text as well as hyperlinks, I need to
only extract the hyperlink addresses to another column
The macro i wrote fails as it tries to do the operation on
text too.
Is there a function to differentiate between text and a
hyperlink?

Any help would be appreciated
Thanks.