Re: Jscript executing
- From: "Norm Cook" <normcookNOSPAM@xxxxxxxxxxxx>
- Date: Wed, 28 Sep 2005 08:31:07 -0500
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
"Jarek" <jarek@xxxxxxxxxxxxxx> wrote in message
news:dhe2hr$70n$1@xxxxxxxxxxxxxxxxxxxxxxx
> 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
.
- References:
- Jscript executing
- From: Jarek
- Jscript executing
- Prev by Date: Re: Computing for Outlook Express in VB.
- Next by Date: Customize an OpenDialog
- Previous by thread: Jscript executing
- Next by thread: XML Reference in VB
- Index(es):
Relevant Pages
|