Hey Everyone,
I previously posted a request to help me automate play list creation from a filtered list here. In my first post, I asked for way too much help and my second post, I posted way too much code. Never got a reply, so I'm going to keep it simple this time.
I need to know how to extract a relative hyperlinks absolute link. What I have so far is:
The link returned is the relative link I used to create the hyperlink, I need to convert it to an absolute. Any ideas?
I previously posted a request to help me automate play list creation from a filtered list here. In my first post, I asked for way too much help and my second post, I posted way too much code. Never got a reply, so I'm going to keep it simple this time.
I need to know how to extract a relative hyperlinks absolute link. What I have so far is:
Code:
Private Function GetHyperAddy(cell As Range) As String
On Error Resume Next
GetHyperAddy = cell.Hyperlinks.Item(1).Address
If Err.Number <> 0 Then GetHyperAddy = "None"
On Error GoTo 0
End Function
Sub playlist()
Dim HyperAddy As String, cl As Range, clSource As Range
Set clSource = Worksheets("sheet2").Range("A:A")
For Each cl In clSource
HyperAddy = GetHyperAddy(cl)
If Not HyperAddy = "None" Then
With Worksheets("sheet2").Range("B65536").End(xlUp).Offset(1, 0)
.Offset(0, 0).Value = cl.Text
.Offset(0, 1).Value = HyperAddy
End With
End If
Next cl
The link returned is the relative link I used to create the hyperlink, I need to convert it to an absolute. Any ideas?