Last active
December 29, 2015 09:49
-
-
Save zhimiaoli/7653142 to your computer and use it in GitHub Desktop.
将选中的表格,链接到标题为表格内容中的表。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub createhyperlink() | |
' | |
' 将选中的表格,链接到标题为表格内容中的表。 | |
' 举个列子,如果单元格的内容是foo,就会把这个表格链接到foo表。 | |
' | |
' | |
On Error Resume Next | |
For Each celln In Selection | |
celln.Select | |
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _ | |
celln.Value & "!A1", TextToDisplay:=celln.Value | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment