+ Reply to Thread
Results 1 to 3 of 3

"Document not saved" state - what are possible (vba code) causes ?

  1. #1
    Registered User
    Join Date
    01-08-2024
    Location
    Coventry, UK
    MS-Off Ver
    MS 365 Apps
    Posts
    4

    Lightbulb "Document not saved" state - what are possible (vba code) causes ?

    Have twice in last month found Excel getting into a state where it refuses to save, returning the "Document not Saved" pop-up, after having successfully been through some code.

    Most online searches on that "Document not Saved" text return information about issues accessing the target save location, so not code related. Those can be dealt with. More of an issue is where Excel itself gets into a state where it can't save. This thread is for folks to list any such they've found; preferably with 'solutions' where appropriate. I'll add the 2 cases I've come across as responses.

  2. #2
    Registered User
    Join Date
    01-08-2024
    Location
    Coventry, UK
    MS-Off Ver
    MS 365 Apps
    Posts
    4

    Exclamation Re: "Document not saved" state - what are possible (vba code) causes ?

    See other post in this (excel-programming-vba-macros) to sit: 1417603-microsoft-excel-document-not-save-able-after-code-successfully-run-in-beforesave-event.html#post5907607 - ( sorry site not letting post links yet (not even to itself )

    Summary - Results from code in a BeforeSave event. Solution - avoid such code - see indicated post.


    { Microsoft® Excel® for Microsoft 365 MSO (Version 2308 Build 16.0.16731.20182) 32-bit }
    Last edited by SimonTi; 01-23-2024 at 11:11 AM.

  3. #3
    Registered User
    Join Date
    01-08-2024
    Location
    Coventry, UK
    MS-Off Ver
    MS 365 Apps
    Posts
    4

    Re: "Document not saved" state - what are possible (vba code) causes ?

    If your code Closes a Window which is not active, and said code is run from an ActiveX control on a sheet, then the state/error occurs.

    E.g.
    Please Login or Register  to view this content.
    would run okay on its own, or from a form control . It does runs okay from ActiveX button; but subsequently you can't save.

    So not running from an ActiveX control or having code:
    Please Login or Register  to view this content.
    would be okay.


    { Microsoft® Excel® for Microsoft 365 MSO (Version 2308 Build 16.0.16731.20182) 32-bit }
    Last edited by SimonTi; 01-23-2024 at 11:14 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Error 1004 "Document not saved" when Closing File WITHOUT CHANGES??
    By Merf in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-11-2023, 06:38 PM
  2. Why do I get "Document Not Saved" error?
    By rkjudy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-15-2010, 11:54 AM
  3. "Document not saved" error. Read on for details...
    By ajava in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-16-2009, 03:57 PM
  4. "Document not saved" error
    By AVR in forum Excel General
    Replies: 0
    Last Post: 07-03-2007, 08:46 AM
  5. Replies: 0
    Last Post: 08-07-2006, 01:35 AM
  6. "Document not saved" error message
    By Richard Clayton in forum Excel General
    Replies: 0
    Last Post: 03-11-2005, 01:50 PM
  7. Replies: 1
    Last Post: 01-24-2005, 08:06 PM

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