View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Steve Yandl[_3_] Steve Yandl[_3_] is offline
external usenet poster
 
Posts: 117
Default reading hyperlinks

This would show you the URL of the hyperlink in cell A1. You would want to
set this up to loop through all the cells in whichever column your links
are. If there is only one hyperlink in each cell, you can stick with the
"hyperlinks(1)" as I show in the example.

'------------------------------
Sub GetHyper()
Dim strURL As String
If Cells(1, 1).Hyperlinks.Count 0 Then
strURL = Cells(1, 1).Hyperlinks(1).Address
End If
MsgBox strURL
End Sub
'-----------------------------

Steve Yandl



"dstiefe" wrote in message
...
I have a column of information and in each cell is a word...and the word is
also a hyperlink

in VBA how do i assign the URL of the hyperlink to a variable?

Thank you