+ Reply to Thread
Results 1 to 7 of 7

save changes

  1. #1
    Forum Contributor
    Join Date
    08-27-2019
    Location
    europa
    MS-Off Ver
    excel 2007
    Posts
    456

    save changes

    Hello everybody
    Is it possible to save changes to a single sheet when closing the workbook without asking?
    If there are any changes to other sheets of the workbook, the notice must appear.
    I hope I have explained.
    Thank you

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: save changes

    It is not possible to only save changes to 1 sheet - Saving is an all-or-nothing operation.

    I appreciate this is a follow-up to another thread of yours so all you can really do is record the fact user X opened the workbook. Do that when the workbook is opened and immediately save again (before any other changes can be made). At least you can record that X opened the workbook but you cannot record that X made changes or when X closed the workbook - To do that you need to save the history in an external file.
    Last edited by cytop; 06-15-2022 at 07:37 AM.

  3. #3
    Forum Contributor
    Join Date
    08-27-2019
    Location
    europa
    MS-Off Ver
    excel 2007
    Posts
    456

    Re: save changes

    Hello,
    the macro that saves who opens the workbook in an external file I have it:
    Please Login or Register  to view this content.
    but I thought it could also be done in a single file.
    the other thead's macro inserts in the workbook whoever opens the file
    but if I make changes to the workbook they remain even if I say no to closing.

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: save changes

    "...but if I make changes to the workbook they remain even if I say no to closing."

    You said much the same in the other thread. In that, you were updating a worksheet and saving the workbook on open; here, you're updating an external file. Either way, you are writing, and committing/saving changes so, of course, they will remain when the workbook is closed. I can't think what it is you actually want to do here.

  5. #5
    Forum Contributor
    Join Date
    08-27-2019
    Location
    europa
    MS-Off Ver
    excel 2007
    Posts
    456

    Re: save changes

    At closing in the workbook that saves outside there is this
    Please Login or Register  to view this content.
    in this workbook if I choose not to make changes they do not remain.



    in the other thread with this macro:
    Please Login or Register  to view this content.
    the changes always remain

  6. #6
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: save changes

    Would that not be something to do with the fact there a line that saves the workbook?

  7. #7
    Forum Contributor
    Join Date
    08-27-2019
    Location
    europa
    MS-Off Ver
    excel 2007
    Posts
    456

    Re: save changes

    This

    End With

    ThisWorkbook.Save '<<<<<<<

    ThisWorkbook.Saved = bSaved '<<<<<<<<<<

    End Sub

+ 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. Excel doesn't change the cell format on save through the workbook save button
    By mitko1994 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-16-2017, 03:09 PM
  2. Replies: 1
    Last Post: 04-29-2016, 11:55 AM
  3. [SOLVED] Need to loop a macro to save images to file - but save to user defined directory.
    By superfurry in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-19-2015, 07:49 AM
  4. Templates - Forcing Save as rather than Save on first save
    By Spitinyari in forum Excel General
    Replies: 4
    Last Post: 04-26-2012, 11:32 AM
  5. Disable Save As and Save - enable Save via button
    By LampCommandr in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-07-2011, 05:42 PM
  6. [SOLVED] How to diasble save and save as menu but allow a save button
    By hon123456 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-12-2006, 04:55 AM

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