Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help needed to build activex control
Message
General information
Forum:
Visual Basic
Category:
ActiveX controls
Miscellaneous
Thread ID:
00347514
Message ID:
00347557
Views:
13
You may not be getting a handle on the object. Printer doesn't exist by itself. You have to reference it in terms of the Document Object Model. With VBScript/IE, you might need a reference similar to the following:

document.all.printer.command1.Click()

Or something like that. I'm not used to using VBScript a great deal because it is limited to IE so I apologize if the above is too JavaScript oriented.


>Hi Guys
>Im new to VB and Im trying to build an Activex control to place on an HTML page.
>
>I have a project called called project1.
>In it i have a usercontrol
>in the user control i have a command button called command1.
>in the click event i have some code to priont to the LPT direct.
>
>I place the activex control on the HTML page I click the button it works fine. When i tyr to call the click event using VB script i
>get an error. saysing object doe not exist.
>
>my html has an id called printer whihc is referencing the activex control.
>
>in the vbscript i call the printer.command1_click()
>
>Can any one help me. I need to trigger the click event from VBscript in the HTML page.
>
>TIA
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform