Open OCX

R

ras

I know how to place an OCX on a form but I would like to open this
directly without placing the component on a form. I would then be
able to use the functions built into the ocx. In php it would be
something like createserverobject("ocxcomponent") but I can't find any
equivilant to use with vba in access.
 
R

RDub

Pretty much the same same in VB / VBA

Dim com as Object
Set com = CreateObject("MSCommLib.MSComm")

Now you are all set to use the MS ActiveX Serial Port control.

When you are all done using the resource

Set com = Nothing

Disposes the object

Rdub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top