Q:

User Defined Class - Object doesn't support this property or method

I'm learning user defined classes by building two:
- Class cRange has low and high properties.
- Class cRanges is a collection of cRange.  I defined Add and Remove method for it.
I couldn't figure out what's wrong with the code below:
Main program:
Sub main()

Dim r As New cRange
Dim rs As New cRanges

r.Low = "1"
r.High = "10"
rs.Add (r)

r.Low = "21"
r.High = "30"
rs.Add (r) '<-- Object doesn't support this property or method

Debug.Print (rs.Contains("5"))
Debug.Print (rs.Contains("15"))
Debug.Print (rs.Contains("25"))

End Sub

cRange class module:
' CLASS MODULE - cRange
' Member variables
Private m_Low As String
Private m_High As String

' Properties
Property Get Low() As String
    Low = m_Low
End Property

Property Get High() As String
    High = m_High
End Property

Property Let Low(s As String)
    m_Low = s
End Property

Property Let High(s As String)
    m_High = s
End Property

' Methods
Public Function Contains(s As String) As Boolean

If Val(s) >= Val(m_Low) And Val(s) <= Val(m_High) Then
    Contains = True
Else
    Contains = False
End If

End Function

cRanges class module:
' CLASS MODULE - cRanges
' Member variables
Private m_Ranges As New Collection

' Methods
Public Sub Add(r As cRange)
    m_Ranges.Add (r)
End Sub

Public Sub Remove(r As cRange)
    m_Ranges.Remove (r)
End Sub

Public Function Contains(s As String) As Boolean

For Each r In m_Ranges
    If r.Contains(s) Then
        Contains = True
        Exit Function
    End If
Next

Contains = False
End Function

Thank you......................................................................................................................................................................................................................................................

A:

try 
rs.Add r '<--take out parentheses.

