Evaluate Text As Code
-
-
-
Re: Evaluate Text As Code
Give up and use VBA code.
-
Re: Evaluate Text As Code
You can use the Run method:
Code
Display MoreSub x() Dim vResult As Variant vResult = Application.Run("y", 100, "Bob") MsgBox vResult End Sub Function y(i As Long, s As String) y = i & s End Function
You might also look at the VBA Evaluate function.But I agree with Dave ...
-
Re: Evaluate Text As Code
Great answer using application.run. I'll let you know after I test it, but it certainly looks like it is exactly what I need.
-
Re: Evaluate Text As Code
If wanted to use code to run code why did you title your thread as "Evaluate Text As Code" and not something like "Run Code With Code"?
-
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!