If I understand Gary correctly, he wants a function that will take as an argument the name of a variable in String form and return the value of that variable. My response in post #6 does that. An example usage:
Sub Process_Globals
Dim aBc as Int = 12
End Sub
Sub Activity_Resume
Log("value of aBc: " & GetVariableValueJO(Me, "aBc"))
End Sub
Yes, this is it exactly. I looked at your prior post and didn't quite get how to use it but the example makes it very clear.
My purpose for this is as follows in case someone is wondering what I could possibly use this for.
I have a class, lets call it MyDoohickey.
I dim as follows:
Dim DH1 as MyDoohickey
Dim DH2 as MyDoohickey
Dim DH1_Value
Dim DH2_Value
Inside the MyDoohickey class I have a Timer that polls the parent and grabs whatever is in the variable that corresponds to it's name. In order to do that I needed to compound the name the class was created under (DH1, DH2) and then append "_Value" so that DH1 grabs the value from DH1_Value and DH2 grabs the value from DH2_Value.
I know that I could do this the other way, by setting up a timer in the parent and pushing the value to the class. However, I think that this is a much cleaner solution as the timers can sit dormant inside the class until they are needed. If you invoked 6 of these classes the timer code inside the parent would start to get unwieldy.
Thank you everyone for your responses and I hope this is of use to others.