View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JU JU is offline
external usenet poster
 
Posts: 4
Default Query refreshing inside a loop - out of memory

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
'code
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic


Thank you John - good tip for my future tries. It helped a bit at the beginning, but did not solve the problem.
I finally found what's hapening. It has nothing to do with VBA and Excel itself. It is ODBC and MsQuery issue. As the query is "left outer join" it cannot be handled and stored somehow as a table (view) but stays at memory. Every time I refresh it a new view is added to the existing one. This is how I imagine in simplfied manner as I am not a programmer.
So I would now define the problem in other terms:
Assuming that I cannot use such a query how to compare two columns using VBA to have as a result only cells from the right column not existing in the left one?

Regards
Jarek