Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Excel VBA - Web Query causes Excel to run out of Memory

Happy Holidays...

I am writing a VBA script that uses Excel to get external data from a web site in the form of a web query. This technique works fine, except the process (which cycles through several thousand times) comes to grinding halt when Excel runs out of memory€¦ and I have a lot of memory on the PC.

I am not saving any variables from the web query (i.e. .SaveData = False etc.) and I have the following lines in the VBA script:

X = ActiveSheet.QueryTables.Count
ActiveSheet.QueryTables.Item(X).Delete
Range("a1:r120").Select
Selection.Clear €˜deletes data from query
Unload (QueryTables)
Application.Goto Reference:="ExternalData_"
Selection.Delete Shift:=xlUp

In other words, Im trying to clear everything I can identify after capturing certain data from the query before cycling to another input variable to reduce the size of the file and minimize memory usage€¦ but to no avail.

I have not seen any Knowledgebase articles specifically on this subject. Is this unavoidable, or is there a VBA command and/or Excel technique Im missing?

Thanks in advance to anyone who can help or steer me in the right direction.

Regards - James

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel VB Out of Memory Annette Excel Discussion (Misc queries) 0 December 19th 07 07:29 PM
Memory Leak in Excel ofra Excel Discussion (Misc queries) 0 August 28th 05 02:20 PM
Memory leak query Blue Aardvark Excel Discussion (Misc queries) 3 July 27th 05 09:01 AM
Excel memory Jon Irwin Excel Programming 0 September 24th 03 02:38 PM
Excel+Not Enough Memory.. Olly[_2_] Excel Programming 3 July 9th 03 03:39 PM


All times are GMT +1. The time now is 11:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"