Discussion Locked

MS Access97 - Excel 97, Out of memory

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I update Excel pivot reports from Access 97. A table in Access stores the Excel XLS files to be updated. VBA code opens an Excel workbook from the Access table list, runs a refresh macro on each pivot table in the Excel workbook, saves and closes the workbook (but not Excel, returns to Access for the next Worksheet to open and update.
This works fine for about the first 7 or 8 workbooks in the list and then I receive an "out of memory" message generated from Excel.
Any ideas on how to rectify this error message so that I can continue processing the remaining workbooks in the list.

5 replies

by donq

I absolutely agree with Answer 1. You will need to rework your code (or macro) to save then close each open Excel workbook AND Access recordset after each pair has completed their assigned tasks. You definately have enough memory to support a single iteration if you don't run out of memory until you're working on the 7th or 8th dataset before running out of memory now.

This discussion is closed to new replies.