Hi,
How can i do:
and have VBA to evaluate the string A as a VBA command?Code:A = "msgbox " & chr(34) & "Hello" & chr(34)
ProcEvaluate(A)
Evaluate is a common procedure in programming languages.
Is VBA lacking it?
Thanks
Printable View
Hi,
How can i do:
and have VBA to evaluate the string A as a VBA command?Code:A = "msgbox " & chr(34) & "Hello" & chr(34)
ProcEvaluate(A)
Evaluate is a common procedure in programming languages.
Is VBA lacking it?
Thanks
Look for Application.Run
Thanks,
but Application.Run seems only to run macros.
Is there a way to run chunks of code?
Let me rephrase.
Suppose you want to create variables
A1
A2
A3
An
via FOR loops where i=1 to n
How would you do?
That's really script-like. Much like languages that support syntax like "/echo {A{1}}" type expressions. VBA is not that kind of language. You'll want to use arrays and enumerations.
research on callbyname