NativeExcel for .Net Developer's Reference

IHyperlinks.Item Property

Gets the IHyperlink interface at the specified index in the collection.

[C#] In C#, this property is the indexer for the IHyperlinks class.

[Visual Basic]
Default Property ReadOnly Item( _ 
   ByVal Index As Integer _ 
) As IHyperlink
[C#]
IHyperlink this[
   int Index
] { get; }
[C++]
__property IHyperlink* get_Item(
   int Index
);
[JScript]
returnValue = IHyperlinksObject.Item( Index );
-or-
returnValue = IHyperlinksObject( Index );

[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.

Parameters

Index
The one-based index of the IHyperlink interface to retrieve in the collection.

Property Value

An IHyperlink interface at the specified index in the collection.

Remarks

Use this indexer to get an IHyperlink interface from the IHyperlinks collection at the specified index, using array notation.

Example

The following example changes ScreenTip of hyperlink one on cell C5.

[C#]
IRange range = book.Worksheets[1].Range["C5"]; 
if (range.Hyperlinks.Count > 0) 
    range.Hyperlinks[1].ScreenTip = "NativeExcel"; 
[Visual Basic]
Dim range As IRange = book.Worksheets(1).Range("C5") 
If range.Hyperlinks.Count > 0 Then
   range.Hyperlinks(1).ScreenTip = "NativeExcel"
End If
[C++]
IRange* range = book->Worksheets->Item[1]->Range->Item["C5"]; 
if (range->Hyperlinks->Count > 0) {
    range->Hyperlinks->Item[1]->ScreenTip = S"NativeExcel"; 
}

See Also

IHyperlinks Interface | NativeExcel Namespace