Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Loosing memory from excel object.
Message
 
To
19/03/1999 17:36:38
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00200020
Message ID:
00200024
Views:
15
>I´ve found that accessing the pagesetup object of an excel application uses some memory wich is not released after closing the excel object.
>
>Try this:
>1. Check the amount of memory available (setup - control Panel - system - performance)
>2. run the following code
>
>MyExcel = CreateObject("Excel.Application")
>MyExcel.WorkBooks.Add()
>MyExcel.ActiveSheet.PageSetup.CenterHeader = "MY HEADER "
>MyExcel.ActiveWorkBook.Close(.F.)
>
>3. Check the available memory again (it´s decreased in about 2 - 4%)
>4. Run the code again except for the 3rd line
>3. Check the available memory again (it´s NOT decreased from last check)
>
>How could I put a header on my excel object programmatically without loosing memory?
>
>Thanks for any help.

You have not released excel is the reason that you are losing mem. Just closing the book does not automaticly release it.

Try
release MyExcel

That should bring back your mem

HTH
Jeff

It's Time to get a gun.

That's what I've been thinkin.

I think I can afford one, If I do a little less Drinkin.

www.TrueGeeks.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform