+ Reply to Thread
Results 1 to 4 of 4

Need macro to show that workbook has been saved

  1. #1
    Forum Contributor rkjudy's Avatar
    Join Date
    03-31-2009
    Location
    Longview, TX
    MS-Off Ver
    MS Office 2010
    Posts
    239

    Need macro to show that workbook has been saved

    I have a workbook that I constantly am improving with new macros and VB routines. I sometimes have two versions available for use at the same time. I would like to create a macro or routine that will tell me if the workbook has been saved. A simple cell color change to indicate I've saved would be fine. Also, if I DO save the file and the cell color changes to indicate I have saved, I would like the cell color to change back if any change is made to the workbook. This way I will always know if I need to save or not to keep latest changes. Any suggestions?
    Last edited by rkjudy; 11-25-2009 at 03:15 PM.

  2. #2
    Valued Forum Contributor JeanRage's Avatar
    Join Date
    03-02-2009
    Location
    Nice, France
    MS-Off Ver
    Excel 2003
    Posts
    705

    Re: Need macro to show that workbook has been saved

    Hi,

    You are describing your own solution perfectly ...
    Step 1 . In your VBA code, as soon as the save instruction is performed, add a flag such as coloring a given celll
    Step2 . In your sheet module, add a worksheet_change event which changes the color back to "Not-Yet-Saved" ...

    HTH

  3. #3
    Forum Contributor rkjudy's Avatar
    Join Date
    03-31-2009
    Location
    Longview, TX
    MS-Off Ver
    MS Office 2010
    Posts
    239

    Re: Need macro to show that workbook has been saved

    Thanks for the reply. The problem is that I don't know what the code is or where to put the code. I have a pretty basic understanding of macros and VB, but I get confused as to what goes where.
    Last edited by rkjudy; 11-25-2009 at 12:56 PM.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Need macro to show that workbook has been saved

    Why do you need this? If you attempt to close an unsaved workbook, Excel will prompt you to save. In addition, if you use a macro in the sheet_change of workbook_sheetchange event that changes any sheet in any way, it will clobber your Undo stack.

    You could use the status bar; code goes in ThisWorkbook.
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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