All Forums >> [Scripting] >> WSH & Client Side VBScript >> How to call ActiveX objects methods in vbscript ? Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
I've written an activeX control that I've registered using the "regsvr32" DOS command. Then I've included this control in an html page thanks to "ActiveX Control Pad". When I launch the html page, the activeX object displays properly and reacts correctly on the events for which I have written code in Visual Basic ( Private Sub Button1_Click() for example ). THE PROBLEM IS that there are some public procedures/functions of the ActiveX object that I would like to call in the vbscript section of my html page. When I launch the script wizard in the activeX control pad, I can see the public variables and procedures or functions of my ActiveX control. Those I want to call are indeed among them ... but I don't succeed in calling them ! This is what my code looks like :
New Page
The line of code that bothers me is : call UserControl1.setMail("blablabla") where "setMail" is the name of a public procedure of my ActiveX object.
This line doesn't do what it is supposed to ! ( It doesn't do anything actually ). Also, because of this line, the following vbscript lines seem not to be executed.