How can I evaluate a string into an object in VBA?

前端 未结 3 1383
無奈伤痛
無奈伤痛 2020-12-03 19:58

In my previous question, How do I assign a value to a property where the property name is supplied at runtime in VBA?, I learned to use CallByName to set a property in a cla

3条回答
  •  余生分开走
    2020-12-03 20:11

    This time you're out of luck. There is no VBA equivalent of eval (not in Excel anyway...there is in Access VBA).

    (Application.Evaluate() evaluates strings as Excel expressions, not as VBA code.)

提交回复
热议问题