
Call Let/Get Prop using string variable for name
I need to call a Let or Get property using a string variable rather than the
property's actual name because I'm using a generic class module as a
go-between other class modules. for example,
clsA needs to get a value from clsB, but for reasons, clsA and clsB will be
communicating via a generic class module called clsX. clsA will pass a
number of parameters and intructions of things to do into clsX and then pass
clsX into clsB. one of the string parameters will be the name of the Get
property we want to retrieve a value from like: "Co_Type"
This is how I'm trying to make it work.
strName = "Co_Type"
----------------------------------------
'Get Prop in clsB
Public Property Get Co_Type() as String
Co_Type = udtProps.Co_Type
End Property
---------------------------------------
clsX.Test = clsB(strName) 'instead of clsB.Co_Type
Somehow I want to call the Property Co_Type by using strName
Any ideas???
Thanks.
--
George Padvorac