NamedRange.Hyperlinks Property (2007 System)

Gets a Hyperlinks collection that represents the hyperlinks in the NamedRange control.

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 NamedRange 
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 in the NamedRange control.

Examples

The following code example creates a NamedRange and then uses the Hyperlinks property to add a hyperlink to the NamedRange.

This example is for a document-level customization.

Private hyperlinkRange As Microsoft.Office.Tools.Excel.NamedRange

Private Sub AddHyperlink()
    hyperlinkRange = Me.Controls.AddNamedRange( _
        Me.Range("B4"), "hyperlinkRange")
    Me.hyperlinkRange.Hyperlinks.Add( _
        Me.hyperlinkRange.Cells, "https://www.contoso.com", , _
        "Contoso Web Site", "www.contoso.com")
End Sub
Microsoft.Office.Tools.Excel.NamedRange hyperlinkRange;
private void AddHyperlink()
{
    hyperlinkRange = this.Controls.AddNamedRange(
        this.Range["B4", missing], "hyperlinkRange");
    this.hyperlinkRange.Hyperlinks.Add(this.hyperlinkRange.Cells,
        "https://www.contoso.com", missing, "Contoso Web Site",
        "www.contoso.com");
}

.NET Framework Security

See Also

Reference

NamedRange Class

NamedRange Members

Microsoft.Office.Tools.Excel Namespace