Gruppe
Allgemein
Problem
Die Hyperlink-Addressen aus Spalte A sollen in einen Kommentar in Zelle B1 eingefügt werden.
StandardModule: Modul1
Sub Hype2Comment()
Dim cmt As Comment
Dim iRow As Integer
Dim sTxt As String
iRow = 1
Do Until IsEmpty(Cells(iRow, 1))
sTxt = sTxt & Cells(iRow, 1).Hyperlinks(1).Address & vbLf
iRow = iRow + 1
Loop
With Range("B1")
If Not .Comment Is Nothing Then
.Comment.Delete
End If
Set cmt = .AddComment(sTxt)
End With
End Sub