Is it possible to execute a function whose definition is stored in a variable in VBScript? For example:
Set fun = "Sub fun" &
" MsgBox 1" &
"End Sub"
the variable fun
has the function definition so is it now possible to somehow execute this function using eval or something else?
eval
in help it will tell you related functions at the bottom. Try it.Call ExecuteGlobal("sub fun()" & vbCrLf & "msgbox 1" & vbCrLf & "end sub")
. That will dynamically create the procedurefun()
but you'll still need to call it afterwards.