提示:其它语言是由 Google 机器翻译的。 你可以访问 English 版本。
登录
x
or
x
x
马上登记
x

or

如何在Excel中一次打开多个超链接?

假设我在工作表中有很多超链接,通常我可以通过逐个点击来打开它们,但多次点击会很烦人,所以,我希望如果有一种快捷方式可以打开所有选定的超链接同一时间。 从下面的文章中,我可以用简单的方法解决这个问题。

用VBA代码一次打开多个超链接

Office选项卡在Office中启用选项卡式编辑和浏览,使您的工作更轻松......
Kutools for Excel - 最佳办公生产力工具将解决您的大部分Excel问题
  • 重用任何东西: 将最常用或最复杂的公式,图表和其他任何内容添加到您的收藏夹中,并在将来快速重复使用它们。
  • 超过20文本功能: 从文本字符串中提取数字; 提取或删除部分文本; 将数字和货币转换为英语单词...
  • 合并工具:多个工作簿和表格合二为一; 合并多个单元格/行/列而不丢失数据; 合并重复行和总和...
  • 拆分工具:根据价值将数据拆分为多个表格; 一个工作簿到多个Excel,PDF或CSV文件; 一列到多列......
  • 粘贴跳过 隐藏/过滤行; 数和总和 按背景颜色; 创建邮件列表和 通过Cell的价值发送电子邮件...
  • 超级过滤器: 创建高级过滤方案并应用于任何工作表; 排序 按周,日,频率等; 筛选 通过大胆,公式,评论......
  • 超过300强大的功能; 适用于Office 2007-2019和365; 支持所有语言; 在公司轻松部署; 全功能60天免费试用。

箭头蓝色右泡 用VBA代码一次打开多个超链接


要一次打开所选范围的超链接,以下VBA代码可以帮助您,请按照以下步骤操作:

1。 按住 ALT + F11 键,然后打开 Microsoft Visual Basic for Applications窗口。

2。 点击 插页 > 模块,并将以下代码粘贴到 模块窗口.

VBA代码:一次打开多个超链接

Sub OpenHyperLinks()
'Update 20141124
	Dim xHyperlink As Hyperlink
	Dim WorkRng As Range
	On Error Resume Next
	xTitleId = "KutoolsforExcel"
	Set WorkRng = Application.Selection
	Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
	For Each xHyperlink In WorkRng.Hyperlinks
		xHyperlink.Follow
	Next
End Sub

3。 然后按 F5 键运行此代码,并会弹出一个提示框提醒您选择一个范围,包括您想要一次打开的超链接,请参阅屏幕截图:

DOC-开多超链接,1

4。 然后点击 OK,所有超链接都会同时打开而不点击它们。


相关文章:

如何删除/删除Excel中的所有或多个超链接?

如何删除超链接而不删除格式?

如何在Excel中一次更改多个超链接路径?


Kutools for Excel - 最佳办公生产力工具提高80%的生产力

  • 重用: 快速插入 复杂的公式,图表 以及你以前用过的任何东西; 加密单元格 密码; 创建邮件列表 并发送电子邮件...
  • 超级方程式酒吧 (轻松编辑多行文字和公式); 阅读布局 (轻松读取和编辑大量单元格); 粘贴到过滤范围...
  • 合并单元格/行/列 不丢失数据; 分裂细胞含量; 组合重复的行/列...防止重复的细胞; 比较范围...
  • 选择复制或唯一 行; 选择空行 (所有细胞都是空的); 超级查找和模糊查找 在许多工作簿中; 随机选择......
  • 精确复制 多个单元格而不更改公式参考; 自动创建参考 多张表; 插入项目符号,复选框等等......
  • 提取文本,添加文本,按位置删除, 删除空间; 创建和打印分页小计; 在单元格内容和注释之间转换...
  • 超级过滤器 (将过滤方案保存并应用到其他工作表); 高级排序 按月/周/日,频率等; 特殊过滤器 用粗体,斜体......
  • 结合工作簿和工作表; 根据键列合并表; 将数据拆分为多个表格; 批量转换xls,xlsx和PDF...
  • 超过300强大的功能。 支持Office / Excel 2007-2019和365。 支持所有语言。 在您的企业或组织中轻松部署。 全功能60天免费试用。
kte tab 201905

Office选项卡为Office提供选项卡式界面,使您的工作更轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,Publisher,Access,Visio和Project。
  • 在同一窗口的新选项卡中打开并创建多个文档,而不是在新窗口中。
  • 通过50%提高您的工作效率,每天为您减少数百次鼠标点击!
官方底部
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Guest · 22 days ago
    Its works awesome.

  • To post as a guest, your comment is unpublished.
    James · 2 months ago
    When I use this on a column of hyperlinks generated by the =HYPERLINK() formula, it doesn't seem to work. When I copy/paste the values into a new column and run it there, it doesn't work. When I go to each individual cell, go to the end of text, and hit enter (causing it to become a hyperlink) it DOES work.


    This didn't work for my needs, unfortunately. I have thousands of rows and clicking enter at the end of each line of text is pretty much what I'm having to do anyway.
    • To post as a guest, your comment is unpublished.
      Johan Nersnæs · 14 days ago
      Found a solution?
      • To post as a guest, your comment is unpublished.
        SimpleDude · 12 days ago
        @James @Johan - Select the text you wish to convert into hyperlink, then use this code to convert the text into hyperlink directly. Then run the code above, works like a charm.


        Sub HyperAdd()

        'Converts each text hyperlink selected into a working hyperlink

        For Each xCell In Selection
        ActiveSheet.Hyperlinks.Add Anchor:=xCell, Address:=xCell.Formula
        Next xCell

        End Sub
  • To post as a guest, your comment is unpublished.
    maov · 5 months ago
    Thanks!
    Works exactly as expected. Must be sure that the links are already valid URLs.
    I opened 15 at one time.
  • To post as a guest, your comment is unpublished.
    John · 7 months ago
    Freezes excel - links never open
  • To post as a guest, your comment is unpublished.
    Vaibhav Jain · 1 years ago
    Please let me know hpw does it work in Mac
  • To post as a guest, your comment is unpublished.
    Ben · 1 years ago
    Does not work for me: after selecting a range, nothing happens. Values are valid URLs.
  • To post as a guest, your comment is unpublished.
    wojtek_bookworm · 2 years ago
    Does not work. Links don't open.
    • To post as a guest, your comment is unpublished.
      Jeremie · 2 years ago
      [quote name="wojtek_bookworm"]Does not work. Links don't open.[/quote]
      Make sure the value is a hyperlink
  • To post as a guest, your comment is unpublished.
    jagdish gaba · 2 years ago
    hi
    this code is very helpful.
    can u pls explain, how to print multiple hyperlinks.
    pls provide code
  • To post as a guest, your comment is unpublished.
    Adrian Tyson · 3 years ago
    Hi,

    Thank you so much!!

    Its very useful for my process, but its not working on the following hyperlink

    =HYPERLINK("mailto:" & A3 & "?subject="& B3, "adrian")

    It again gets back to the module page.

    Can some one help me on this please!!

    BR,
    Adrian
    • To post as a guest, your comment is unpublished.
      AC · 5 months ago
      What answer have you found two years since?
  • To post as a guest, your comment is unpublished.
    Priya · 3 years ago
    Hi

    This code is really helpful but it is asking to select the range, could you tell me how to midify this code for below situation ...
    hyperlinks are already placed in cell A1:C1 to A300:C300 , in D1 there should be link, on clicking D1, the hyperlinks from A1:C1 should open at once similarly by clicking D2 , hyperlinks from A2:C2 should open at once and so on. Could you please help