I exported a SharePoint library which created an iqy file worked great but after row # 65580, the file names are no longer hyperlinks but come in as multi-line cells with the first row as the URL and the second with the "Friendly Name".
I used several sources to make this macro and keep getting an error on the Hyperlinks.Add line (I tried cel.Hyperlinks.Add same error): Run-time error '1004': Application-defined or object-defined error
The watch shows that the lines are populating the strings correctly. Any help appreciated.
I used several sources to make this macro and keep getting an error on the Hyperlinks.Add line (I tried cel.Hyperlinks.Add same error): Run-time error '1004': Application-defined or object-defined error
The watch shows that the lines are populating the strings correctly. Any help appreciated.
VBA Code:
Sub hyperlinkIQY()
Dim cel As Range
Dim selectedRange As Range
Set selectedRange = Application.Selection
For Each cel In selectedRange.Cells
Dim lines() As String
Dim Hlink As String
Dim Friendly As String
lines = Split(cel.Value, vbLf)
If UBound(lines) > 0 Then
Hlink = lines(0)
Friendly = lines(1)
ActiveSheet.Hyperlinks.Add Anchor:=cel, Address:=Hlink, TextToDisplay:=Friendly
End If
Next cel
End Sub