excel超链接到什么都没有 [英] excel hyperlink to nothing

查看:39
本文介绍了excel超链接到什么都没有的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很多超链接,我想为每个超链接分配一个宏,Worksheet_FollowHyperlink 只捕获插入的超链接,而不是 HYPERLINK() 函数.所以我希望我插入的超链接不涉及任何内容,所以当我按下它们时什么也没有发生.或者我想让他们参考自己.但是当我只是将一个复制到另一个单元格时,它仍然指的是它的父单元格.所以我必须编辑一个新的,以便它引用它的新单元格.我还有数百个超链接需要复制和编辑.我需要它,因为我不希望超链接跳过我到父超链接的单元格.

I've got a lot of hyperlinks and I want to assign a macros to each of them and Worksheet_FollowHyperlink captures only Inserted Hyperlinks but not the HYPERLINK() function. So I want my Inserted Hyperlinks refer to nothing so when I press them nothing happens. Or I want them to refer themselves. But when I just copy one to another cell it still refers to its parents cell. So I have to edit a new one so it refers to its new cell. And I've got hundreeds of hyperlinks to be copied and edited as well. I need that because I don't want the hyperlinks skip me to the parent hyperlink's cell.

提前致谢

推荐答案

使用 HYPERLINK() 函数会更好.你可以像这样使用它:

You will be better off using the HYPERLINK() function. You can use it for what you want like this:

=HYPERLINK("#HyperlinkClick()", "Text you want to Display")

注意开头的 #.这很重要.

现在创建一个名为 HyperlinkClick 的函数:

Now create a function called HyperlinkClick:

Function HyperlinkClick()

    Set HyperlinkClick = Selection
    'Do whatever you like here...
    MsgBox "You clicked on cell " & Selection.Address(0, 0)

End Function

请务必将此功能放在标准代码模块中.

就是这样.

这篇关于excel超链接到什么都没有的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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