Opening Activex Object

TKnight

Registered User.
Local time
Today, 02:03
Joined
Jan 28, 2003
Messages
181
Hi, i'm trying to open up an activex control (Groupwise Address Book) from a command button on a form. I'm using the code below but I get the error message "Activex component can't create object"

Code:
Dim GWaddress As Object
Set GWaddress = CreateObject("GWABLib.GWab")

I've tried re-registering the gwab1.ocx I've also tried regsvr32 on it and that was successful but I still get the error message.

If I use the toolbox and just insert the Activex control on my form it opens up fine but I need to run some code first so I want to run it from a command button.

I've been through everything on Microsofts support page but nothing seems to fix it....

Any ideas?

Thanks, Tom.
 
This may be of no help, but just in case...

When I create an Outlook Email message in VB, The object and the item are called seperately. (Your code looks like it tries to combine the calling of an ActiveX object with the specific ActiveX file)

So for example

dim MyOLapp as OLapp
dim MyOLitem as OLitem
MyOLapp = docmd.createobject(OLapp) [this calls the application]
MyOLitem = MyOLapp.open(OLitem) [this calls one of the application's features/files]

I know I'm getting the names & types wrong here, but maybe it will give you an idea of how you might be able to call the ActiveX object seperately from the specific AxtiveX file.

Hope this works out.
- dave
 

Users who are viewing this thread

Back
Top Bottom