Escape
and Unescape
functions available to the VB6 programmer.The best thing would be add
MSSCRIPT.OCX
to the project, but for the sake of demonstration, I'll use CreateObject
instead.Using the code is easy.
It's that simple. And the technique can be used to get at other VBScript functionality. In fact,
.Language
can have values other than "VBScript"
, making it possible to interface to any language with a Windows Scripting Host presence. © Copyright Bruce M. Axtens, 2009
7 comments:
Be aware that the Microsoft script control is not supported on Vista.
Hmmm ... not good news. Interestingly a VB6 application I'm developing on Windows 7, using MSScriptControl, works fine. So "not supported" evidently doesn't mean "not there".
It seems to be running perfectly happily on W7 for me. Excellent and elegant solution to a pernicious problem.
for more source code please visit to my blog http://vb6stuff.blogspot.com
It is not working if my string contains newline chars VBCRLF
I shall have a look at it, Anonymous, and get back in a few days time.
The function escape is not working correctly if string to evaluate contains " ) vbcrlf.
What to do?
Post a Comment