Share via


WorksheetBase.Hyperlinks Property

Definition

Gets a Hyperlinks collection that represents the hyperlinks for the range or worksheet.

public:
 property Microsoft::Office::Interop::Excel::Hyperlinks ^ Hyperlinks { Microsoft::Office::Interop::Excel::Hyperlinks ^ get(); };
public Microsoft.Office.Interop.Excel.Hyperlinks Hyperlinks { get; }
member this.Hyperlinks : Microsoft.Office.Interop.Excel.Hyperlinks
Public ReadOnly Property Hyperlinks As Hyperlinks

Property Value

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 Microsoft.Office.Interop.Excel.Hyperlinks collection of the worksheet.

This example is for a document-level customization.

private void AddHyperLink()
{
    Excel.Hyperlink link = (Excel.Hyperlink)this.Hyperlinks.Add(
        this.Range["A1"], "http://www.microsoft.com", "Microsoft", "Microsoft");
}
Private Sub AddHyperLink()
    Dim link As Excel.Hyperlink = _
        CType(Me.Hyperlinks.Add(Me.Range("A1"), _
        "http://www.microsoft.com", ScreenTip:="Microsoft", _
        TextToDisplay:="Microsoft"), Excel.Hyperlink)
End Sub

Applies to