With Visual Studio 2005 and Framework 2.0 you discontinued the Microsoft.Vsa namespace. How do I execute vbScript in your latest framework without having to return back to your COM MSScriptControl (C:\WINDOWS\System32\msscript.ocx)
I had been using the with Visual Studio 6.0 and then upgraded to VS 2005. I am using msscript.ocx in C++ and what used to work under 6.0 now does not. Calling Run on the control for a function with a single input parameter returns “0x80020003 Member not found”. The same result is true even with a VERY simple VBScript function like:
I have not tried that yet, but I will. However, I did try running a simple test subroutine with no problems. Sub Test1 'Todo:... End Sub (It was actually passed in as a BSTR: "Sub Test1\r\n\t 'Todo:... \r\n End Sub")
There were no errors... can you see why this would work but not a function even though the sub was not public
vbScript with .NET
Lieblick
Function myFoo (inBar)
myFoo = inBar
Return myFoo
Thanks for the help,
Greg
Ike
Sub Test1
'Todo:...
End Sub
(It was actually passed in as a BSTR: "Sub Test1\r\n\t 'Todo:... \r\n End Sub")
There were no errors... can you see why this would work but not a function even though the sub was not public
Greetings
Hi Joel, The script control is the only way to run vbscript.
Paul
MichaelPolak
Have you tried explicitly declaring this as Public Function
Regards