使用VBA提取多个单元格的超链接
问题描述:
我想迭代列,并提取要在代码中使用的每个超链接(将其与一些文本进行比较)。
I want to iterate through a column, and extract each hyperlink to be used in the code (going to compare it to some text).
任何好的指针如何做提取部分?
Any good pointers on how to do the extraction part?
答
可以使用 .Hyperlinks(1).Address
获取超链接
例如,这将提取从A1到A5的超链接
For example this will extract the hyperlinks from A1 to A5
Sub Sample()
Dim i As Long
For i = 1 To 5
Debug.Print Range("A" & i).Hyperlinks(1).Address
Next
End Sub