Link to home
Start Free TrialLog in
Avatar of jayleno
jayleno

asked on

Runtime Error '48' When CreateObject("Excel.Application")

Hi Experts,

I am using VB6 and in my app I involk Excel.  My app has been working fine for quite some time.  Recently I got a runtime error '48' - "Error in loading DLL" when I try to involk the Excel.  The stange thing is the same app involks Excel fine on other PCs.  I think it's some MS Office set up problems, but after I uninstall MS Office XP and reinstall MS Office XP, the error still exists.  I could not find any problems with the CLSID in the registry for Excel.

Here are the details:
OS: Windows 2000 server or Windows XP - app tested fine on both OS but error also happens on both;
Excel version: Using Excel 10, with MS Office XP - I went back to Excel 9 and MS Office 2000, but the sme thing - it works fine on some machine and not on others, no matter what OS.

Any help will be greatly appreciated!
Avatar of Sethi
Sethi
Flag of India image

The version of excel being used in the application is causing problems. Example you are referring Excel 2000 object but the machine has Excel XP.
ASKER CERTIFIED SOLUTION
Avatar of Sethi
Sethi
Flag of India 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 jayleno
jayleno

ASKER

Hi Sethi,

Thanks a lot for your help! I used late binding and it worked.

I have compared the registry between a working installation and one that give this error and cannot find any difference in term of Excel version or CLSID values. The only strange thing I noticed is with MS Office XP: now when I open an Excel file or Access DB there is a pop up box saying it's installing Excel/Access components/features every time, even though when I install MS Office XP I choose to install all components, and I upgrade to MS Office XP SP3.  I don't know why there are these installing componeents on demand thing, maybe it has something to do with my runtime '48' error?

But anyway, use late binding is a cleaner solution, and it works.  Thanks again.

Joe
:-) Anytime friend
I tried the late binding code on XP SP3 and I still get the error 48 can't load DLL

How do I debug that?