Name
hyperlinks
.Add(Anchor
, Address
, [SubAddress
], [ScreenTip
], [TextToDisplay
])
Synopsis
Adds a hyperlink.
Argument |
Settings |
---|---|
|
A |
|
The URL to navigate to when the hyperlink is clicked. |
|
A location on the page. |
|
A tool tip to display when the mouse pointer pauses over the hyperlink. |
|
The text to show on screen in place of the hyperlink. |
For example, the following code adds a hyperlink to range A1:
Sub AddHyperlink( ) Dim ws As Worksheet Set ws = ActiveSheet ws.Hyperlinks.Add [a1], "http:\\excelworkshop.com\", _ , "Go to Jeff's site.", "Excel Workshop" End Sub
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.