excel - Should I have to have duplicate values in VBA class objects? -


i've been using vba class modules in excel while now, i'm not sure creating them correctly. create module level variables class , property let , functions. example:

private msregion string  property region() string     region = msregion 'return region end property  property let region(byval sregionname string)     msregion = sregionname 'set region end property 

when @ objects in local window notice each property end module scoped variable , variable required let function. seems duplication of variable me. i'm concerned if instatiated large collection of objects several properties in each costly in terms of resources.

i've tried modify code 1 variable in object class, far i've got error messages pains.

does know of way create properties in class modules not lead duplicate variables?

edit:

i have had @ locals window , realised argument property let isn't there. 2 expressions appear privately stored variable , proprty value, in case msregion , region. fits in cor_blimey's answer.

have tried or set msregion property in code calling class? if notice not callable.

you structuring class correctly.

the locals window shows declared variables, including private varibale within class.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -