JustinW
asked on
Evaluate String as a sub Routine
I have a string that represents a method I want to execute
on an object inside of a public dictionary object.
Normally the way I'd work with this, is to
do the following:
However, I have SomeFunction,
which gives me the code I need to run
instead:
when I run this, debug.print gives:
and then it blows up because it can't evaluate it.
How do I get this to work?
on an object inside of a public dictionary object.
Normally the way I'd work with this, is to
do the following:
sub Delete_Asset()
dFORMS("Assets").delete_
end sub
However, I have SomeFunction,
which gives me the code I need to run
instead:
sub Button_Click()
dim s as string
let s = SomeFunction()
debug.print s
Application.Eval s
end sub
when I run this, debug.print gives:
dFORMS("Assets").delete_
and then it blows up because it can't evaluate it.
How do I get this to work?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.