not enough resources

E

Emily

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?
 
J

joel

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top