In VBA I would like to call a Property Let() from within my class constructor rather than just setting the variable in the constructor. Is there anyway to do this?
1 Answer
Unless I've misunderstood your question, you're looking for the Me keyword.
Option Explicit
Dim l_ As Long
Private Sub Class_Initialize()
Me.l = 5
End Sub
Public Property Let l(newl As Long)
l_ = newl
End Property
1 Comment
DasPete
You understood it perfectly, that's exactly what I was looking for. I knew it had to be something simple. Thank you very much!