Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Seems like msscript control ".state = connected" doesn't work?

Status
Not open for further replies.

Kieninger

Programmer
Dec 20, 2001
4
US
I want the msscript control to act as an event sink in vb6. I have found several references to this on msdn and othe rplaces, but no working examples. In theory, I should be able to do this:

myscriptcontrol.AddObject "mybutton", Command1
myscriptcontrol.Addcode "sub mybutton_Click()" & vbCrLf & _
"msgbox" & Chr(34) & "button click" & Chr(34) & vbCrLf & "end sub"
myscriptcontrol.State = Connected

Then when Command1 is clicked the event should be passed down to the mybutton_Click through the script control.

But it doesn't work and my work will be much cleaner if I can make it work.

Thanks,
Karl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top