I tried to overload in VBA within a class module:
Dim a As Integer
Public Property Let SomeNumber(newNumber as Integer)
a = newNumber
End Property
Public Property Let SomeNumber(newNumber as String)
a = Val(newNumber)
End Property
Public Property Get SomeNumber() As Integer
SomeNumber = a
End Property
The compiler complains that an "ambiguous name was detected" where clearly there is a different signature. Is it possible to overload a property defined within a class in VBA or VB6? If so, what would be the syntax?
Moreover, if property overloading is not possible, what benefits do properties offer over get/set methods defined by public functions other than a more seamless way to access the fields of an instantiated object?