+ Reply to Thread
Results 1 to 9 of 9

Workbook sheet change event prompts save

Hybrid View

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

    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.
    Entia non sunt multiplicanda sine necessitate

  2. #2
    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.)

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

    Re: Workbook sheet change event prompts save

    So ... what behavior do you want?

  4. #4
    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.

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

    Re: Workbook sheet change event prompts save

    If "done" means when the sheet is deactivated, then
    Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
        If LCase(Right(Sh.Name, 2)) = "sd" Then Me.Save
    End Sub

  6. #6
    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