PDA

View Full Version : [SOLVED:] Looking for Let/Get generating macro



Paul_Hossler
11-26-2019, 03:26 PM
Before I try to re-invent the wheel, does anyone have a macro that will generate the Let/Get statements from the Class variables?

Taking something like this



Option Explicit


Private m_SomeDouble As Double
Private m_SomeString As String



and generating the Property statements like this



Option Explicit


Private m_SomeDouble As Double
Private m_SomeString As String


Public Property Let propSomeDouble(D As Double)
m_SomeDouble = D
End Property
Public Property Get propSomeDouble() As Double
propSomeDouble = m_SomeDouble
End Property


Public Property Let propSomeString(S As String)
m_SomeString = S
End Property
Public Property Get propSomeString() As String
propSomeString = m_SomeString
End Property

Bob Phillips
11-27-2019, 09:30 AM
Carlos Quintera's MZ-Tools addin does just that.

Paul_Hossler
11-28-2019, 08:34 AM
I'll check it out