Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I - unfortunately - use Excel 2007. I wrote a macro for the following
task: - a folder contains a number of files, each with 3 tabs, "Source Data", "Details" and "Summary". These files are reports, all in the same format as they are created by another macro. "Details" and "Summary" contain formulas based on the content of "Source Data" - the macro cycles through all files in the folder and merges them in 2 files, pasting values only and leaving out the source data - the output is therefore 2 files: "MergedDetails" and "MergedSummaries"; each of those files contains one tab per original source file. For example, if you want to quickly compare the details of File1 and File2, you'll open MergedDetails and compare the tabs File1 and File2. Same for the summaries. The problem is, my code kept crashing Excel. To isolate the problem, I separated the code into 2 different macros: one for the details and one for the summary. The latter works, the former keeps crashing Excel. I tried all sorts of workarounds: I ran the macro on local (rather than network) folders, I set 2 to 4 second delays before closing and saving files, but nothing changed. The weirdest thing is that, debugging the code, I noticed that Excel always crashed at different points in the macro: sometimes after processing the 3rd file, some other time after processing the 8th, sometimes after closing one file, some other time after copying some cells... I never got any out of memory error. I don't get this. If my code is wrong, why does Excel always crash at different points in the code? Finally, I tried the very same code on a different PC running Excel 2003 (and on the very same source files), and it does work fine! Would you have any suggestions on how I can get my code to run with Excel 2007? Or at least on how I can get some additional help? I know some Excel 2007 macro functionalities are no longer supported ( like Application.Filesearch, for instance), but at least in those cases you get a clear error message that helps you understand what the issue is! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 crashes when perform SAVE AS to Excel 97-2003 | Excel Discussion (Misc queries) | |||
2007 slow vs 2003 and it crashes? | Excel Discussion (Misc queries) | |||
Excel 2003 Crashes | Excel Discussion (Misc queries) | |||
xls file works fine in Excel 2000 and 2007 but crashes on opening in 2003 | Excel Discussion (Misc queries) | |||
Word 2003 Find/Change Automation from Excel 2003 crashes Excel 200 | Excel Programming |