使用VBA提取多个单元格的超链接 [英] Extracting the hyperlink from multiple cells with VBA

查看:203
本文介绍了使用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

这篇关于使用VBA提取多个单元格的超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆