Link to home
Start Free TrialLog in
Avatar of miraodb
miraodb

asked on

An error occurred initializing the VBA libraries (1004)

HI all,

I'm stock :-(
I have windows XP Pro with office 2003. I installed it on a brand new PC tried to open an excel file which uses VBA and i get this error message:
An error occurred initializing the VBA libraries (1004)
then it asks me if i want to repair the install since a component is missing. If i say yes, it does repair it and then i can use my file, but right after i close it, i get the same message if i open it again.

If i say no i get this message: An error occurred initializing the VBA libraries (1004)

The thing i think is that VBA isn't correclty installed (wierd since it's a brand new install thgouh .....) and even though i repair it doesn't keep it.

The other point i can mention is that, if i accept the repair then when closing XL i get an error telling me "an error occured blablabla" with a checkbox to restart it. the basic error message. I don't get it if i don't repair.

Any hints ?

Thanks in advance
miraodb
Avatar of KauaiDawn
KauaiDawn
Flag of United States of America image

Hi Mira.  The following Microsoft article should resolve your issue as it sounds like maybe the first excel doc you opened contained macros so Excel never got a chance to install the VBA editor:

Scroll down to the resolution and follow the instructions:

http://support.microsoft.com/kb/287105/EN-US/ 

Hope this helps.  If this did not resolve your issue please let me know.  Please let me know if the issue was corrected by accepting this answer.
Thank you.  KauaiDawn
Avatar of miraodb
miraodb

ASKER

Hi kauaidawn,

I already found this on the net, but it doesn't work coz actually there're two cases:

if i don't repair, then the button for Visual Basic Editor is greyed, so i can't click on it.
if i repair then vba is opening fine but afterwards whjen i open again excel it ask me the same thing.

I wonder if it cant be a version problem between VBA installed by default in common folder with XP and the one with excel 2003.
If that's the case, is there a way to install the vba libraries by hand ? maybe that could do it......
I looked on internet and couldn't find much info about it, that's why i ended up here asking the experts ;-)

Cheers,
fabrice
Sorry Fabrice, I didn't realize you had already started researching.  Bare with me here as I ask you for a bit of clarification:

Did you just mention that you have 2 versions of Office installed? XP and 2003.  If so, then yes I would say your assumption is correct so lets see if the following will work:

Select Tools / Addins and select all of the addins available.  If this does not work go to the other version and do the same... or if they are already selected, deselect, open the 2nd version and do it again.  If it works try going back to the second version and opening a file.

Let me know how it goes.  kauaiDawn
Avatar of miraodb

ASKER

Oups sorry iu wasn't clear enought too .... i was talking about windows XP and office 2003.
I actually installed those two on a blank drive.

anywya i tried what u suggested on my office 2003 and nothing changed.

thanks for your help
Let's try the following if you have some time:

Do you have another fiel that uses VBA?  Does it give you the same error?  We need to determine if the file is the issue.

KauaiDawn
Avatar of miraodb

ASKER

Hi i tried with a sample from internet and it does the same thing.
not a file issue i guess. most likely office or windows....
Ok, I found a great article with multiple troubleshooting on the Microsoft site.  Since a corrupt file has the same error I was hoping that would be it as it was an easy solution.  Another suggestion (link below) is that you edit the registry to remove corrupt addins.  you might want to try this abut be aware any customization you might have done in all office programs will reset to the default settings:

Corrupted Add-ins Under the Tools Menu
On the Tools menu, click Add-Ins. Click to clear the check boxes for any add-ins that are selected, and then click OK.

Corruption in the Registry Keys
Remove the following registry keys.

Note Removing the following registry keys may reset customized user settings for your Microsoft Office programs.

Excel 2003
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0

But also check out the document and see what you think since you have seen and tried just about everything something else might strike you.

http://support.microsoft.com/?kbid=280504#XSLTH3227121122120121120120

Going to bed now but I'll check in the morning for your reply.  Maybe someone else will see this also and make a suggestion.  Hope this works.  KauaiDawn
Avatar of miraodb

ASKER

Hey, i tried all kind of test suggested there but unfortunetely didn't change a thing...
i'm hoping that the office i have is corrupted.
i'll try to use another one.
if in the mean time anybody got an idea, i'm all hears open !!!

cheers,
miraodb
Sorry none of the documented repairs worked mira.  Maybe someone will read through this and have another suggestion.  Let us know if anything changes in the meantime.

KauaiDawn
ASKER CERTIFIED SOLUTION
Avatar of miraodb
miraodb

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