Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Memory problem Refreshing data
I have gotten the same error message. it seems to have
something to do with the "refreshall" statement and i had multiple querytables in one file to refresh. I refreshed mine from the excel side via macro. i solve the problem by refreshing each querytable 1 at a time. yes less effecient but i couldn't get around the memory problem with refreshall. You might try something like that. why it happen by switch to XP...not sure on that one. -----Original Message----- Hi, I have created the following module in order to call a specific 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 every day for about 10 months. After upgrading to WinXPpro the same code give a "Not enough memory to 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 is OK. So, are there any ideas about what is going on and, more important, are there any suggestions? NOTE that i must use scheduling because this job 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 refresh 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/ . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Import External Text Data and Refreshing Problem | Excel Worksheet Functions | |||
problem refreshing data query on yahoos | Excel Discussion (Misc queries) | |||
VC Problem refreshing pivot table | Excel Discussion (Misc queries) | |||
Out of Memory Problem | Excel Programming | |||
problem with excel refreshing Via macro | Excel Programming |