+ Reply to Thread
Results 1 to 6 of 6

"not enough memory" error on workbook.save , but not .close(SaveChanges:=True)

  1. #1
    Registered User
    Join Date
    03-18-2013
    Location
    france
    MS-Off Ver
    Excel 2010
    Posts
    4

    "not enough memory" error on workbook.save , but not .close(SaveChanges:=True)

    Hi all,

    I have a quite big workbook to work with, and I need to save it (without closing it) during the process.

    I've declared a gwbk as workbook, and everything works fine, until I try to save it :

    "gwbk.save" generate a "Not enough memory to complete the task"

    meanwhile, if I do :
    gwbk.close (SaveChanges:=True),

    every thing works fine.
    Of course, the problem with a .close is that I have to reopen it just after having closing it, so it's not convenient at all....

    Have you any idea or tracks for a such issue ?
    Thanks for your help,
    Sylvainsylvain

  2. #2
    Forum Guru
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: "not enough memory" error on workbook.save , but not .close(SaveChanges:=True)

    hi Sylvainsylvain, as a quess the problem with Save method is that the workbook is sort of rewritten where Close method with SaveChanges parameter set to True just saves the changes done.
    You can obviously try either not to save changes until you finished working with the workbook to avoid reopening it or try to use Autosave feature in the workbook parameters.

  3. #3
    Registered User
    Join Date
    03-18-2013
    Location
    france
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: "not enough memory" error on workbook.save , but not .close(SaveChanges:=True)

    Thanks watersev for you reply.

    I nevertherless hardly understand why my ".save" is not working.
    The file is on a server.
    When I run the program from an "old" Corei3 64 bits with 4 Go Ram, it's working, and when I run it from a new brand i7 64 bits 8 Go, I've got this bloody error.

    If I check on the i7 the resources monitor, everything (memory and error writing) seems ok.

    Have you got any idea about ?
    Or is it a way to call the "SaveChanges" method out off the .close one ?

    Thanks very much again for your help

  4. #4
    Forum Guru
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: "not enough memory" error on workbook.save , but not .close(SaveChanges:=True)

    what is the reason to save it in the process and not save it once at the end?
    Do you use same Excel version on both PCs?

  5. #5
    Registered User
    Join Date
    03-18-2013
    Location
    france
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: "not enough memory" error on workbook.save , but not .close(SaveChanges:=True)

    I need to save for some other routine program check the last date the file was modified.

    But I've made a mistake : the same error occurs on my iCore 3 64 bits. I suspect an issue between OS 64 bit and the Excel 32 bits : the interface 64/32 bits that run as a thread of Excel may be could lead to the error, and that could explain why everything is clear for Excel in the monitor system (?).
    I'll try to install a Excel 64 bits, and home.

  6. #6
    Registered User
    Join Date
    03-18-2013
    Location
    france
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: "not enough memory" error on workbook.save , but not .close(SaveChanges:=True)

    Hi waterserv,

    well. I've installed a 64 bit Excel version, and the .save is now working...
    I suspect the windows program to run x86 version on Windows 7 64 bits was not able to manage a such memory...

    Thanks again for you help

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1