+ Reply to Thread
Results 1 to 3 of 3

How do I offer a 'CANCEL' when user closes the document?

  1. #1
    Forum Contributor
    Join Date
    10-25-2010
    Location
    Phoenix, Arizona, USA
    MS-Off Ver
    O365
    Posts
    201

    How do I offer a 'CANCEL' when user closes the document?

    I have a document that we update every shift of work. To preserve what 'was', in the Document Close event, I have an archive file saved with date/time in the file name, so going back to reconstruct what was documented is fairly easy.

    In the Document Close event, I ask the user if they want to save changes, if yes then I have the code save the file, and then save the archive copy. If no, then I change the .Saved property to TRUE.

    I would like to offer the vbYesNoCancel dialog, but I don't know how to cancel the closing event.

    Any suggestions?

    Thank you!

    Here is the code that I am using in the Document Close event...

    Please Login or Register  to view this content.

  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: How do I offer a 'CANCEL' when user closes the document?

    Completely untested. In the ThisDocument module, in lieu of your existing code,

    Please Login or Register  to view this content.
    Last edited by shg; 09-26-2012 at 07:46 AM.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    10-25-2010
    Location
    Phoenix, Arizona, USA
    MS-Off Ver
    O365
    Posts
    201

    Re: How do I offer a 'CANCEL' when user closes the document?

    I will try tonight when I return to work, THANK YOU for your contribution.

+ 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