DG_Montana
New Member
- Joined
- Dec 27, 2011
- Messages
- 19
I've created a VBA process that opens an Excel template file, populates it with data from a server, saves, prints and closes the file. This process works flawlessly when executed from a menu by a user, but I have been asked to automate it to create a series of reports. To do this, I open a file that contains the list of geographic regions that required reports (there are about 3100 geographic regions that need reports created). The automated process creates, saves and prints one report in just over a minute, but the process dies with an out of memory error during the processing of the 61st report. It doesn't seem to matter which geographic region I begin with, it always runs fine until the 61st geography in the list and then throws an out of memory error.
The out of memory error occurs in one of several different subroutines, so it seems to be unrelated to a specific line of my VBA code. This process has been run on an old laptop with just 1GB of memory (XP & Excel 2007) and also on a fairly new desktop PC with 6GB of memory (64-bit Windows 7 and Excel 2007), but it fails at the 61st report on both machines. Does anyone know of some limitation in Excel that might be causing this, and of a work-around? Thanks!
The out of memory error occurs in one of several different subroutines, so it seems to be unrelated to a specific line of my VBA code. This process has been run on an old laptop with just 1GB of memory (XP & Excel 2007) and also on a fairly new desktop PC with 6GB of memory (64-bit Windows 7 and Excel 2007), but it fails at the 61st report on both machines. Does anyone know of some limitation in Excel that might be causing this, and of a work-around? Thanks!