vba strings replacing
OK Starting all over again and hopefully a bi开发者_Python百科t more straight forward.
Var = 24
string = "var"
x = string
This results in
x = "var" NOT x = 24
Is it possible to retrieve the value of var, by using the string stored in string
Thank you
Aaron
I don't believe you are able to do that. As a solution you can use a collection to mimic this behaviour:
Sub TestCollection()
Dim Values As New Collection
Values.Add "24", "Var"
Values.Add "Alexander", "Name"
MsgBox Values("Var") & " " & Values("Name")
End Sub
精彩评论