I've written a class in VBA, with members and properties set up as follows:
Private mSomeVar As String
Public Property Get SomeVar() As String
'...
End Property
Private Property Let SomeVar(value As String)
'...
End Property
Which seems like pretty standard practice - read-only properties with private Let functions so the class itself can modify the value, and I can apply some logic (validation, etc) in the property body while doing so, whilst preventing anything outside the class from changing it.
The problem is, when I try to use the Private property from within the class, the VBE tells me that it cannot be found:
Private Sub SomeInternalMethod()
'Compile error: Method or data member not found
Me.SomeVar = "new value"
End Sub
Why can't I use the class's own private properties from within the class itself? If they're invisible from both within and without, is it possible to use private properties at all?