NativeExcel for .Net Developer's Reference

IHyperlinks.Count Property

Returns the number of hyperlinks. Read only.

[Visual Basic]
PropertyReadOnlyCountAsInteger
[C#]
intCount{get;}
[C++]
__propertyintget_Count();
[JScript]
functiongetCount():int

Example

This example displays the number of hyperlinks on worksheet one.

[C#]
MessageBox.Show(String.Format("{0} hyperlinks on worksheet one.", 
book.Worksheets[1].Hyperlinks.Count));
[VisualBasic]
MessageBox.Show(String.Format("{0} hyperlinks on worksheet one.",_ 
                book.Worksheets(1).Hyperlinks.Count))
[C++]
MessageBox::Show(String::Format(S"{0} hyperlinks on worksheet one.", 
      book->Worksheets->Item[1]->Hyperlinks->Count));
This example displays the number of hyperlinks on range A1:D10.
[C#]
MessageBox.Show(String.Format("{0} hyperlinks on A1:D10..", 
                book.Worksheets[1].Range["A1:D10"].Hyperlinks.Count));
[VisualBasic]
MessageBox.Show(String.Format("{0} hyperlinks on A1:D10.",_ 
                book.Worksheets(1).Range("A1:D10").Hyperlinks.Count))
[C++]
IRange* range = book->Worksheets->Item[1]->Range->Item[S"A1:D10"];
MessageBox::Show(String::Format(S"{0} hyperlinks on A1:D10.", 
                 range->Hyperlinks->Count));

See Also

IHyperlinks Interface | NativeExcel Namespace | IWorksheet.Hyperlinks Property | IRange.Hyperlinks Property