开发者

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 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜