Link to home
Start Free TrialLog in
Avatar of ShockUK
ShockUK

asked on

activex can't create object solution, ahhh

Hello guys,
I have the below script that I'm running on my work PC, I have had my computer replaced and now I get the above error trying to run my VBA script in Access. The code highlights the code

Set BoApp = CreateObject ("BusinessObjects.application")

I have been trying everything I can find for the past 2 days to fix this, I've looked at a lot of forums and people seem to figure it out but never really post how.

I have unregistered and registered the following references in VBA:
Microsoft ActiveX Data Objects 2.1 Library
Microsoft DAO 3.6 Object Library
BusinessObjects 6.5 Object Library

Business objects is installed on my Local PC in program files,
Can anyone think of anything???

Thanks

Sub irb_data_update(boname As String, bopwd As String)
 
Dim BoApp As busobj.Application
Dim BODoc As busobj.Document
Dim BORep As busobj.Report
Dim boDP As busobj.DataProvider
 
    Set BoApp = CreateObject("busobj.Application")
 
        With BoApp
         .LoginAs boname, bopwd, False
         .Visible = True
         .Documents.Open (DumpPath & "ledger_irb.rep")
             With .ActiveDocument
                  .Refresh
             End With
        End With
 
Set BODoc = BoApp.ActiveDocument
Set boDP = BODoc.DataProviders.Item(1)

Open in new window

Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Have you checked that your BO program is running OK - can you open files and create new stuff?
Avatar of ShockUK
ShockUK

ASKER

I've opened the program a few times manually and reports so I know it does run/open ok
ASKER CERTIFIED SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ShockUK

ASKER

I have
BusinessObjects 6.5 Object Library
setup as a reference, I also tried running set BoApp = New busobj.Application instead and it still came up with the same error.

I guess there is no log that ActiveX runs to catch the error?
What happened on a debug/compile? If no errors then nothing should happen.

try this, create a form, then in design view, click on Insert/ActiveX Control and look for your business object., Then drag that onto the form. If it doesnt like it, then a more helpful error message is displayed, one better than vba approach. I am not familiar with business objects using with vba and considering your code used to work but now doesnt seems to me more to do with the install. I dont know if there are seperate design licences or not.
Avatar of ShockUK

ASKER

When I go to Insert - ActiveX control the business objects doesn't come up on the list.

But it does show in the library in VBA, do you know how I can register it?
Avatar of ShockUK

ASKER

I've noticed that my Business Objects doesn't have VBA enabled.
Would this stop it from working even though I'm running the VBA from Access?
Avatar of ShockUK

ASKER

Managed to fix this now,
Kept the original code but had to reinstall Business Objects to enable VBA and then everything worked

Thanks for everyones help