Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / September 2005



Tip: Looking for answers? Try searching our database.

Jscript executing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jarek - 28 Sep 2005 13:32 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.