From: Emily on
I have code that does the following:
Refreshes 730 X 26 cells from an external data source for the first item in
a list
Copies the refreshed cells to a new workbook
removes rows for items that have no data for the item.
do while <> end of list
Refreshes the cells for the next item on the list. 730 X26
copies and pastes the cells of the refeshed data under the last set of
data pasted.
removes rows for the item that have no data
Refresh the next item on the list
end while

I have 5000 items.
I estimated the new workbook will contain a sheet with 10,000 rows due to
deleting rows that have no data.
The problem is that I have only been able to get the code to run to around
1200 items before it freezes or I get the message "not enough resources".
I have no idea what is causing this. It would be great if I knew what to
elimate or if I new how to test if resources were getting low so the
application could exist gracefully.

The only application I have running when I run this code is excel.
I have no list boxes or filters in the workbooks.

Any ideas?






From: joel on

When you copy the data to a new workbook use PasteSpecial using Value
only. I think you are copying links to the new workbook. The links are
getting modified when you are copying the data and point to resources
that are not valid. It is not a problem with something like a memory
resource. Error message in Microsoft tools are vague and sometimes
mis-leading.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?u=229
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=199951

http://www.thecodecage.com/forumz