通过连接链接模板与细胞文本创建超链接 - Excel的VBA

问题描述 投票:0回答:1

我试图把已经在它的文本为超链接的列。各栏,我想在链路模板的最后添加信息。例如,假设:

 "/stackoverflow.com/" is my link template
 Range("A2") = "a_two" and Range("A3") = "a_three" 

我想小区A2和A3转换为超链接,并分别以“/stackoverflow.com/a_two”和“/stackoverflow.com/a_three”设置的网址。我怎样才能做到这一点?

感谢所有

excel vba hyperlink concatenation
1个回答
-2
投票
      Dim r as range
      For each r in selection
          activesheet.hyperlinks.add Anchor:=r,Address:="/stackoverflow.com/" & r.text
      next r
© www.soinside.com 2019 - 2024. All rights reserved.