Is it posibble to executing JavaScripts from VB6 by MSScriptControl but
I want to pass pointer to VB Object???
Anyway my example: (not works, Why? )
Set MyClass = New Class1
ScriptControl1.AddObject "MyClass", MyClass
ScriptControl1.ExecuteStatement "MyClass.MyDate = Now()"
MsgBox MyClass.MyDate
Set MyClass = Nothing
Norm Cook - 28 Sep 2005 14:31 GMT
Hard to tell without seeing the content of Class1
This code works fine for me:
Form1:
Option Explicit
Private Sub Form_Load()
Dim MyClass As Class1
Set MyClass = New Class1
ScriptControl1.AddObject "MyClass", MyClass
ScriptControl1.ExecuteStatement "MyClass.MyDate = Now()"
MsgBox MyClass.MyDate
Set MyClass = Nothing
End Sub
Class1:
Option Explicit
Public MyDate As Date
> Is it posibble to executing JavaScripts from VB6 by MSScriptControl but
> I want to pass pointer to VB Object???
[quoted text clipped - 8 lines]
>
> Set MyClass = Nothing