VBScript's Eval() function, much like the eval() functions in PHP and
other languages, allows you to fead a line of standard text -- usually
dynamic -- and treat it as code. For instance, the following VBScript
code:
Dim strCode, intValue
strCode = "CInt(85.33284)" ' Basic string expression
intValue = Eval(strCode) ' Evaluates the string as code
In this case, intValue would be assigned an integer value of 85.
Is there any way to do this in VB, short of referencing the VBScript DLL
and using the function from there? It's for use in a DLL and I don't
really want to have it linked to 20 outside DLLs.