Home > Language Reference > Classes > Collection

Count Property

Number of elements in a collection.

Syntax

Public Property Get Count() As Integer

Remarks

The Count property returns the number of elements contained in a Collection object. For example:

Private Sub Button1_Click()
  Dim c As New Collection

  c.Add "Euro"
  c.Add "Dollar"
  MsgBox c.Count ' Displays 2
End Sub

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A