+ Reply to Thread
Results 1 to 9 of 9

Workbook sheet change event prompts save

  1. #1
    Registered User
    Join Date
    06-05-2007
    Posts
    81

    Workbook sheet change event prompts save

    Hi, thanks to those that have helped so far! I have many worksheets in a workbook that need to be saved if a user changesanything on them.
    These sheet names all end in "....SD" and the code needs to only run on those sheets. I have learned alot from the forum but not enough, just yet . . This is what I have so far:
    HTML Code: 
    It doesn't like the 2 "Then's". (Don't laugh - I'm trying.) Thank you!!
    Last edited by pprseller; 10-29-2009 at 02:13 PM.

  2. #2
    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: Workbook sheet change event prompts save

    Maybe just this?
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    06-05-2007
    Posts
    81

    Re: Workbook sheet change event prompts save

    That works but its prompting after every cell is typed in. Maybe I'm using the wrong worksheet/workbook event. Can you suggest what to use? The scenario is that I have worksheets that are used over and over again and not saved. The worksheets that end in "SD" must be saved after a change. So the workbook close event won't work either. Is there a way to prompt save when a sheet "loses focus"? Thanks . . . .

  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: Workbook sheet change event prompts save

    The code I posted doesn't prompt at all, does it? It just saves worsheeets ending in "sd" after any manual change.

  5. #5
    Registered User
    Join Date
    06-05-2007
    Posts
    81

    Re: Workbook sheet change event prompts save

    I have code for "before save" prompting user if they are sure they want to save. So I took that out and your code works fine except on every cell change the workbook saves and it takes about 15 seconds to save each time (it's a large workbook!). How can I stop that? (This a worksheet where the user will be filling in 15 fields so that will be too long to wait it out each time a cell is changed.)

  6. #6
    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: Workbook sheet change event prompts save

    So ... what behavior do you want?

  7. #7
    Registered User
    Join Date
    06-05-2007
    Posts
    81

    Re: Workbook sheet change event prompts save

    I want the worksheet to be saved when the user is done using it - all the way done, not cell by cell.

  8. #8
    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: Workbook sheet change event prompts save

    If "done" means when the sheet is deactivated, then
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    06-05-2007
    Posts
    81

    Re: Workbook sheet change event prompts save

    Thanks, that will do it. I appreciate your help.

+ 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