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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

active x component can't create object 3

Status
Not open for further replies.

ruthcali

Programmer
Apr 27, 2000
470
US
hi,
i am using access97.

i have code that works fine on my machine and on another machine, but when i try on another users's machine, he gets 'active x component can't create object.'

He has the following references checked in this order:
visual basic for applications
access 8.0
excel 8.0
dao 3.5
outlook 98

I tried copying my dao350.dll to his computer, unclicking the reference and re-clicking it.
i tried:
Start, Run, regsvr32.exe C:\progra~1\common~1\micros~1\dao\dao350.dll. I was told it was successful, but he still gets the error message.

i have narrowed down the code to just:
Dim objXLApp As Excel.Application
Set objXLApp = CreateObject("Excel.Application")
but he still gets the error message.

Any other suggestions?

Thanks,
Ruth

 
Have you tried manually opening up Excel and then using GetObject instead of Create object just to see if it will work? Also, if you hit F2 and select Excel in the Library list, does everything look reasonable there as well?

Sorry I can't give you more specific help.

Good Luck!
 
hi,
thanks for writing.

i went to the users's computer and manually opened up Excel and then tried your suggestion of GetObject and it did work.

But if i didn't first manually open Excel, then i still got the 'active x' error (which i guess makes sense).

In Access, i tried hitting F2 and selecting the Excel library, and everything looked ok.

i also tried renaming his excel.olb file and then copying my excel.olb file to his hard drive, but that didn't work.

hmmm. oh well. we are all slowly upgrading to Win2000/Office 2000 (with both versions of Access: 97 and 2000). So i'm hoping when he gets a new operating system with a fresh version of Access that his problem gets fixed.

But thanks for your suggestions!
 
I wrote a faq on this at faq705-2882. The MS knowledge base article that is referred to there offers a detailed list of what to delete/re-install.

 
Nicely done Rob,

Thanks for taking the time to document something you had to resolve for the benefit of others. That's one of the reasons why this is one of my favorite technical sites.

Have a great day!
 
Rob,

Thanks for writing. Actually, before i wrote my post, i did a search on tek-tips and found your post. I tried your suggestions of copying my dll to his computer and also i tried re-registering the dll, but didn't have luck.

i'm not ready to tell the user that he has to re-install Office though. But since his operating system will be upgraded in a few weeks, i think the problem will be solved when he gets a fresh version of Office.

But the FAQ is very helpful like SBendBuckeye wrote above. Thanks for writing it!
 
Thank you both for the compliments. I ran into that error a few months ago with a program that I had tried to run on another computer. I was just about ready to swap out the other computer when I came across those instructions on the MS Knowledge Base.

Ruth - sorry to hear that didn't work for you but I think you're probably right about being resolved with the new version of Office.

Rob
 
SBendBuckeye,

Until the user upgrades his operating system, i am using your suggestion of GetObject instead of CreateObject.

On the command button, i just put a msgbox saying 'please open excel before proceeding'.

Then all works well!

Thanks for that suggestion. i would have never thought of it!
 
Hey RuthCali,

You know what they say about necessity being the mother of invention. Have you repaired and compacted the database in question? Also, does CreateObject fail for everything, or just for Excel?

If it only fails for Excel, you could perhaps open Word up hidden and then open Excel hidden from Word, etc. But it sounds like you came up with a very simple work-a-round.

Congratulations and have a great weekend!

 
hi,

Just an update: the user just upgraded his operating system. He now has Windows 2000, Office 2000 and Access 97.

And now CreateObject works!

Yeah!!

Thanks! The temporary work-a-round with GetObject worked fine until he upgraded.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top