我想在超链接打开之前控制它们的打开,但是无论我选择 Sub Workbook_SheetChange 还是其他事件,超链接都会在任何事件之前打开。 我搜索过但找不到如何操作。人工智能向我指出了一个属性 Application.hyperlinks.enanble = False...但我从未找到此方法,即使在加载或卸载所述人工智能提到的库时也是如此。您知道拦截的解决方案之一吗超链接的打开? 预先感谢
不太清楚你的问题的意思,但你可以这样做:
几个示例链接:
=HYPERLINK("#LinkController(""https:///www.google.com"")","Test")
=HYPERLINK("#LinkController(""https:///www.yahoo.com"")","Test")
在常规模块中:
Function LinkController(URL)
Debug.Print "URL: ", URL
Set LinkController = Selection 'have to return soemthing...
If URL Like "*goog*" Then
ThisWorkbook.FollowHyperlink URL
Else
MsgBox "Can't open this link"
End If
End Function