Solved

An error occurred initializing the VBA libraries (265) - MS Excel

Posted on 2003-11-21
7
2,359 Views
Last Modified: 2007-12-19
I am having a problem when i try to open an .xlt excel file.

In Windows2000 with Excel 2000 when I double click on the xlt file to open it I am given the Macros prompt and I click on "Enable Macros" (I've tried clicking "Disable Macros" but still have the same results).  Then I am receving the message: "An error occurred initializing the VBA libraries (265)".  

I click ok on the message and then the Excel application stays open but the Excel file does not open.  If i open the Visual Basic Editor from inside Excel and then try to open the file I receive a "Device I/O" error message.  

In WindowsXP with Excel 2002 I eventually receive a message box saying:
"Errors were detected in 'filename.xlt', but Microsoft Excel was able to open the file by making the repairs listed below. Save the file to make these repairs permanent.  Lost Visual Basic project. Lost ActiveX controls."

When I click Ok the template opens but there is no data in it as there should be.  There is just the header and column headings.

When I then save the file, the file size is goes to 33K instead of the 125K it started at originally.

I've found some articles on Microsoft.com that deal with similar issues but in Excel97 and when I've tried their fixes I still end up with the save problem.  

I've tried opening other xlt files that contain macros as well and they work find.  Any ideas of things I can try to get this file opening properly?  Thanks!
0
Comment
Question by:pliant6
7 Comments
 
LVL 81

Expert Comment

by:byundt
ID: 9800114
Hi pliant6,
Are there supposed to be VBA macros in the template? If so you may want to try "cleaning" them using Rob Bovey's VBA CodeCleaner http://www.cpearson.com/excel/xltools.htm 

Have you tried Excel 2002's File Repair and Open tool? To access it, use the File...Open menu item. Choose your file, then click the triangle to the right of the Open button. Choose File Repair and Open.

Cheers!

Brad
0
 

Author Comment

by:pliant6
ID: 9800211
Yes, when I use the Repair and Open tool in Excel 2002 is when I get the: "Errors were detected in 'filename.xlt', but Microsoft Excel was able to open the file by making the repairs listed below. Save the file to make these repairs permanent.  Lost Visual Basic project. Lost ActiveX controls."

When i tried the VBA Code Cleaner I get a message saying: "Programmatic access to Visual Basic Project is not trusted (CodeCleanerMain).

:(
0
 
LVL 11

Expert Comment

by:turn123
ID: 10177571
pliant6,
No comment has been added lately (62 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Accept byundt's answer http:#9800114 and Refund

Please leave any comments here within 7 days.

-- Please DO NOT accept this comment as an answer ! --

Thanks,

turn123
EE Cleanup Volunteer
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

Author Comment

by:pliant6
ID: 10177801
I would like to request a refund.  Nothing helped to fix this file as it was being corrupted during a Kermit file transfer.
0
 
LVL 11

Expert Comment

by:turn123
ID: 10178723
pliant6,

If you want to delete this question, post a zero-point question in http://www.experts-exchange.com/Community_Support/

Subject: Moderator Please Delete
Body: Please delete this question:
http://www.experts-exchange.com/Applications/Q_20805493.html

or you could just leave it as my recommendation was for you to get a refund.

Turn123
0
 

Accepted Solution

by:
SpazMODic earned 0 total points
ID: 10230076
PAQed, with points refunded (150)

SpazMODic
EE Moderator
0
 

Expert Comment

by:otwo
ID: 14655430
Possible fix
open the workbook in Excel 2002 and hit Alt +F11
Insert from the tool bar
then Module
Select Tools and references
make sure Visual Basics for applications is selected
Add Active controls are also checked


Good Luck!!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Can not delete, remove this shortcut, file 4 39
SonarQube on Linux vs Windows 3 52
Abstract Express Replacement Software 12 39
Veriface disable 2 31
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question