View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
gribs_kon gribs_kon is offline
external usenet poster
 
Posts: 1
Default Memory problem Refreshing data

Hi,

I have created the following module in order to call a specifi
workbook from inside an Access mdb and refresh the DataTables in it
(In the Excel file i have 15 sheets with 1 DataTable in each one).
Using *task scheduler* and *Win98SE* i was doing this job almost ever
day for about 10 months.
After upgrading to WinXPpro the same code give a "Not enough memory t
display completely" messagebox, _although_refreshing_has_been_done_
and wait for a reply.
If i don't use task scheduler but run the module manualy everything i
OK.

So, are there any ideas about what is going on and, more important, ar
there any suggestions? NOTE that i must use scheduling because this jo
must be done late at night.

I am using Office 97 (yes i know it is old).

------------------------------------------------------------------------------------
Dim MyXL As Object
Dim i As Long

Set MyXL = GetObject("c:\my documents\myfile.xls")

MyXL.Application.Visible = True
MyXL.Parent.Windows(1).Visible = True
MyXL.Application.ActiveWorkbook.RefreshAll

i = 1 ' This lines are just a small delay until refres
finish.
Do While i < 50000000
i = i + 1
Loop

MyXL.Application.ActiveWorkbook.Save
MyXL.Application.Quit

Set MyXL = Nothing
------------------------------------------------------------------------------------

Thank you in advance

--
Message posted from http://www.ExcelForum.com