Excel VBA创建到另一张表的超链接 [英] Excel VBA create hyperlink to another sheet

查看:314
本文介绍了Excel VBA创建到另一张表的超链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简单的问题,我希望,但研究只提出了一个论坛帖子,提供一堆代码,而不解释任何。

Simple question, I hope, but research has only brought up forum posts that give a stack of code without explaining any of it.

我的工作簿的第一张就像一个内容页面。列A中的每个单元格都包含IP地址字符串。对于每个IP地址,都有一个单独的工作表,它以IP地址命名。我想将内容页面的列A中的单元格转换为相应的表格(目标表单元格A1)的超链接。

The first sheet of my workbook is like a contents page. Each cell in column A holds an IP address string. For each IP address, there is a separate worksheet, which is named with the IP address. I want to turn the cells in column A of the contents page into hyperlinks to their corresponding sheets (cell A1 of the destination sheet).

我只需要VBA行使超链接我可以弄清楚循环等等。请记住,要链接的页面的名称与将成为链接的单元格的值完全相同。

I only need the VBA line that makes the hyperlink; I can figure out the looping, etc. Remember that the name of the page to be linked to is exactly the same as the value of the cell that will become the link.

推荐答案

我记录了制作hiperlink的宏。

I recorded a macro making a hiperlink. This resulted.

ActiveCell.FormulaR1C1 = "=HYPERLINK(""[Workbook.xlsx]Sheet1!A1"",""CLICK HERE"")"

这篇关于Excel VBA创建到另一张表的超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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