Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 VBA 中,我想Property Let()从我的类构造函数中调用 a 而不仅仅是在构造函数中设置变量。有没有办法做到这一点?
Property Let()
除非我误解了您的问题,否则您正在寻找Me关键字。
Me
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