View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.sdk,microsoft.public.excel.worksheet.functions,microsoft.public.office.developer.vba
KevinGPO
 
Posts: n/a
Default QUERY: Excel's SaveAs so slow..

I realised that my excel file template contains quite a massive
macro/script. After running the file it SaveAs a copy of itself (after it
has ran the script, importing data, etc.). It won't need 90% of the
macro/script anymore. How is it possible to remove/delete the class modules
within the Excel file in the new "saved" file?


"KevinGPO" wrote in message
...
Just wondering if anyone knows about Excel's SaveAs command?

I load up a Excel file via VNC on a server on the otherside of the world.
I got a macro which does a SaveAs command to a network drive which is my
local HD. It takes over 12 minutes to do a save of a file only 600kb. Is
this normal?

The macro however does run a lot of formating and data parsing/entry from
an XML file, so I guess a lot of memory would be consumed. Maybe if I free
up the memory before the save? But in Excel you cannot free up memory
easily. There's no memory management commands, and no garbage collection.

Would it be quicker to issue a copy or maybe move command? Because I used
Windows Explorer to copy the 600kb excel file from the server to my local
drive and it took seconds! So maybe it's Excel '97 really slow SaveAs
command?