I am running a VBA macro application in Microsoft Excel 97 under Windows XP -Service Pack 1 to,
1.Open an Excel work book .
2.Update a value in a cell
3.Save and close the file.
I need to repeat the steps 1,2,3 for 1,00,000 times. But after executing the process around 32,000 times the Excel application crashes.The whole OS hangs. And a message box appears As " Run time error -2147467259 (80004005) ", method 'open' of object workbook's failed.
I am facing this problem since last two weeks, If any body have the solution please comment it .
Thanks
Arun
2 1534
I am running a VBA macro application in Microsoft Excel 97 under Windows XP -Service Pack 1 to,
1.Open an Excel work book .
2.Update a value in a cell
3.Save and close the file.
I need to repeat the steps 1,2,3 for 1,00,000 times. But after executing the process around 32,000 times the Excel application crashes.The whole OS hangs. And a message box appears As " Run time error -2147467259 (80004005) ", method 'open' of object workbook's failed.
I am facing this problem since last two weeks, If any body have the solution please comment it .
Thanks
Arun
For the way you're describing it, i'd say there's an integer in the code (presumably in the file's name). Define it as a long.
Or you are creating a new object each time you open a workbook, this will create a new instance, and if you're not closing the ones before, and by a coincidence, your pc crashes when you reach 32K instances. But i'd say this is not the reason, since error (80004005) is a HDD or LAN error (correct me if not, please).
Seems simple enough to verify. Check exactly which number it bombs on. If it's file number 32768 or 32769, then the odds are very good that the problem is related to data size (number of bits).
However, the data-size problem could strike in an unexpected area. For example, what if the OS (or something along the chain, anyway) can't handle more than 32K files in a folder?
While you have a think about this, can we see the actual code?
Oh! Something else that comes to mind. Are you sure you're closing the files after opening them? Perhaps Excel is simply complaining that you're trying to open too many files at once.
Kadghar makes a good point, too. An integer value might "wrap around" after 32K, so you might think you're asking for file 32768, but actually be requesting a negative number.
P.S. Sorry, I just realised I may be making an invalid assumption here. I thought that you were using the number as part of the file name, and thus opening 32000 different files. But in fact I don't think you said that. Are you in fact working with the same file each time, or what?
Sign in to post your reply or Sign up for a free account.
Similar topics
by: I Decker |
last post by:
Hi all,
Hope this is the right group.
I am writing a program in c# to open create an excel document, enter
some data, save it and then email it as an attachment. I have
successfully created...
|
by: Rich Wallace |
last post by:
Is there a way to open an Excel file and either respond to or supress the
Macro warning window via VB.NET?
Dim oExcel As Excel.Workbook
Dim sFilePath As String = "C:\DailyReport.xls"
oExcel...
|
by: cr113 |
last post by:
I just upgraded from Office 2000 to Office 2003. My VB.NET Excel macro
calls don't work any longer.
Here is how I make my Excel macro call from VB.NET:
Dim objExcel as Excel.Application
...
|
by: Mr.Doubt |
last post by:
I'm trying to run a Excel macro, which uses SOLVER.XLA Add-In, in
VB.NET application. When the macro is executed I get the following
error message
"Solver: An unexpected internal error occured,...
|
by: cr113 |
last post by:
We've upgraded from Office 2000 to Office 2003 and now my excel macro
calls are messed up. There's about a 15 second delay from the time I
make the call in VB.NET to the time the excel macro is...
|
by: robert |
last post by:
When employing complex UI libs (wx, win32ui, ..) and other extension
libs, nice "only Python stack traces" remain a myth.
Currently I'm hunting again a rare C-level crash bug of a Python based...
|
by: Senthil |
last post by:
Hi All
I need to create an Excel report and create a command button and
have to run a macro on the
click event that will print all the pages in the Excel workbook.
I am able to create the report...
|
by: developer200701 |
last post by:
The following code (which is distilled down from a larger application)
worked for several years previously. Now, the instant you click on
the print icon within the print preview window the...
|
by: arun0580 |
last post by:
I am running a VBA macro application in Microsoft Excel 97 under Windows XP -Service Pack 1 to,
1.Open an Excel work book .
2.Update a value in a cell
3.Save and close the file.
I need to...
|
by: NeverLift |
last post by:
This is probably answered elsewhere, but I've searched the Web and VBA for Excel manual, find no answers.
I have a VBA-coded macro in an Excel workbook that is to open another existing workbook --...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |