Worksheet.Hyperlinks Property (2007 System)
Gets a Hyperlinks collection that represents the hyperlinks for the range or worksheet.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property Hyperlinks As Hyperlinks
'Usage
Dim instance As Worksheet
Dim value As Hyperlinks
value = instance.Hyperlinks
[BrowsableAttribute(false)]
public Hyperlinks Hyperlinks { get; }
[BrowsableAttribute(false)]
public:
property Hyperlinks^ Hyperlinks {
Hyperlinks^ get ();
}
public function get Hyperlinks () : Hyperlinks
Property Value
Type: Hyperlinks
A Hyperlinks collection that represents the hyperlinks for the range or worksheet.
Examples
The following code example uses the Hyperlinks property to add a hyperlink to the Hyperlinks collection of the worksheet.
This example is for a document-level customization.
Private Sub AddHyperLink()
Dim link As Excel.Hyperlink = _
CType(Me.Hyperlinks.Add(Me.Range("A1"), _
"https://www.microsoft.com", ScreenTip:="Microsoft", _
TextToDisplay:="Microsoft's Website."), Excel.Hyperlink)
End Sub
private void AddHyperLink()
{
Excel.Hyperlink link = (Excel.Hyperlink)this.Hyperlinks.Add(
this.Range["A1", missing], "https://www.microsoft.com",
missing, "Microsoft", "Microsoft's Website.");
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.