Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that is reading data sequentially from 150 text files.
Sometimes the entire process takes 15-20 seconds, and other times it takes a couple of minutes. I can't figure out why there is such a time variance in the amount of time it takes to run. Here are the main parts of the process: 1. Declare variables including dynamic arrays. 2. Size the arrays to 1000 elements using ReDim. 3. Create new Excel workbook. 4. Open first text file and read values into the arrays. Usually there are 100 values per array. 5. Resize the arrays to 100 elements (or however many are necessary, always much less than 1000) using ReDim. 6. Close the text file. 7. Perform some computations. 8. Set Application.ScreenUpdating = False 9. Write computed values to the workbook opened in step 3. 10. Format cells. 11. Loop through steps 4 to 10 until all text files have been processed. 12. A little more formatting. 13. Save workbook and end macro. If you have any suggestions, please let me know. Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
EXCEL macros running much more slowly in EXCEL 2007 vs. 2003 | New Users to Excel | |||
HOW DO I COPY A TOTAL FIGURE FROM 1 SHEET TO NEXT ADDING RUNNING T | Excel Worksheet Functions | |||
WHY the same macro runs so slowly on a different but faster comput | Excel Discussion (Misc queries) | |||
Paste code running extremely slowly... | Excel Programming | |||
Macros in Excel 2000 running very slowly | Excel Programming |