Error in loading DLL

I have a VB script within Excel that references Microsoft Outlook 9.0 Object Library Located in C:\Program Files\Microsoft Office\Office\MSOUTL9.OLB.  When I run the script and hit the statement:

Set ojbOL = New Outlook.Application

 I get a runtime error 48 that says "Error in Loading DLL".

There is nothing wrong with the code as I have run this script several times in the past and it worked just fine.  Moreover, I can run the script without any problems on other computers.  There have been no updates or new installations on this computer.  The only change that had been made was the file "Msoutl.olb" was copied into the same directory as the msoutl9.olb.

I have tried to re-install Outlook and Excel but it has not resulted in any progress.  I have also tried copying over the dll's from other computers where the script will run but I still get the same error.

Please Help!

freejasoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mikal613Commented:


Set ojbOL = CreateObject("Outlook.Application")
0
freejasoAuthor Commented:
Not sure what you mean?

Isn't this the same thing:

dim objOL as New Outlook.Application
set objOL = New Outlook.Application

Anyway... I tried to change it but I still get the same error.  Again, this code is working fine on other computers.

Thanks
0
Mikal613Commented:
he doesnt have outlook installed on his computer
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Mikal613Commented:
C:\Program Files\Microsoft Office\Office\MSOUTL9.OLB

try registering the OLB  first

regsvr32  C:\Program Files\Microsoft Office\Office\MSOUTL9.OLB
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
freejasoAuthor Commented:
Ok I tried to register it and it says:

MSOUTl9.OLB was loaded, but the DllRegisterServer entry point was not found

MSOUT9.OLB does not appear to be a .DLL or .OCX file

I am not sure why it would be corrupt.  I just copied this file from another computer where the programming is running just fine.  What am I misssing??
0
Mikal613Commented:
what version of Internet explorer is he running?
0
freejasoAuthor Commented:
6.0.2800.1106

Not sure was IE has to do with this.

And yes.. Outlook is installed on this computer.
0
Mikal613Commented:
Do you have Access from Office XP and Outlook from Office 2000 (or standalone Outlook 2000)?  Mixing and matching programs from different Office versions can be problematic.

0
freejasoAuthor Commented:
Everything is from Office 2000.
0
Mikal613Commented:
another solution

go to Start/Programs/Microsoft Visual Studio 6/Microsoft Visual Studio 6 Tools/Depends.

Using this program "Dependency Walker", you can select a dll and it will go out and tell you what other dll's it needs.  It highlighted a couple of dll's that I needed and copy them into the directory that your working on.


0
freejasoAuthor Commented:
I don't have "Dependency Walker" installed.  Can you just tell me what other files I need?
0
Mikal613Commented:
send me the exe  vbguru613  at gmail.com
0
freejasoAuthor Commented:
It is not an .exe  ......  It is a VB script within Excel.
0
Mikal613Commented:
MSVBVM60.dll
KERNEL32.DLL
USER32.DLL
GDI32.DLL
ADVAPI32.DLL
OLE32.DLL
OLEAUT32.DLL
rpcrt4.DLL
MSVCRT.DLL
0
freejasoAuthor Commented:
FOUND THE SOLUTION!!!!!!!

I searched in my registry for "msoutl.olb"  I found a reference to it and changed it to "msoutl9.olb".  Now everything is working great.  I guess when I copied "msoutl.olb" into the same directory something picked it up and all the uninstalling and re-installing would never change it.

Thanks for your help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.