Does anyone know how to take a string (eg. read from a database field) and execute that string as vb code.
I just had another thought about this. It might be possible to generate code (or read it from a database or file) and somehow use the Microsoft Scripting engine to execute it. Perhaps by writing it to a .VBS file and executing that.
I understand that you want to do something like this
"text1.visi ble = False" this is stored in a string and you want to exectue the statement stored in the string. If that is the case may be this link could help.
I understand that you want to do something like this
"text1.visi ble = False" this is stored in a string and you want to exectue the statement stored in the string. If that is the case may be this link could help. www.thescripts.com/forum/thread15090.html
Thanks for that link. It does sound to me like just the sort of thing that Grant was looking for. Even if it turns out not to be, I certainly found it interesting. I'll have to look at adding this to the Tips & Tricks thread at the top of the forum.
Does anyone know how to take a string (eg. read from a database field) and execute that string as vb code.
If you are talking about embedding it in a SQL statement, that's quite simple...There' s no problem either if it's a pure Visual Basic code, you can a variable of type string then concatenate it with code...Of course don't forget the syntaxes of VB...
Comment