Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88054

Able to call Property Let/Get dynamically or does each Property need its own fcn?

$
0
0

I have an Excel VBA class with approx 30 diff Properties and I was hoping to avoid writing a Get/Let function for each of them, is there any way to dynamically pass the Property and value?

pseudo code would look something like:

Private strID As String
Private dblAmt As Double
Private dtMatDate As Date

Property Get PropertyName(arg1)
    [get value for whatever Property arg1 represents]
End Property

Property Let PropertyName(arg1,arg2)
    [set value for Property arg1 to value of arg2]
End Property

Viewing all articles
Browse latest Browse all 88054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>