+ Reply to Thread
Results 1 to 3 of 3

detect changes when exit?

  1. #1
    Registered User
    Join Date
    02-18-2005
    Posts
    26

    detect changes when exit?

    hi, ive a sheet that has a save and exit button..everytime i click save, it will duplicate the exist sheet, but i also want my procedure to detect any changes made to the sheet if any, when exiting and decides whether to prompt the user to save or not.. right now all i can do is prompt the user everytime when exit regardless of any changes made or not..

    any help would be greatly appreciated..thankS

    rgds
    Jer

  2. #2
    Registered User
    Join Date
    02-25-2005
    Posts
    84
    Not knowing exactly how you want your function to work, play about with
    'ThisWorkbook.Saved'

    You can either get it to prompt a message box to return true of false, or a custom message if you prefer.
    MsgBox ThisWorkbook.Saved

    The other one is to tell if its saved or not, over-writing its actual status.

    For instance, this would close the workbook without saving and without a save dialogue box regardless of what changes were made. In the Workbook_BeforeClose section, include
    'ThisWorkbook.Saved = True'

    Good for say, a public conversion chart. People can insert their data and extract the info they need but at the end, close without saving, and this will do it without offering a prompt.
    Last edited by widemonk; 04-08-2005 at 04:20 AM. Reason: cos my spelling is obviously not what it should be !!

  3. #3
    Registered User
    Join Date
    02-18-2005
    Posts
    26
    Thanks pal..it not exactly wat i want but ill jus have to make some changes..u see my save button on the sheet is not exactly saving the worksheet, but its actually creating another sheet without saving the workbook..guess theres no other way another except to make it save the workbook as well...thanks!!!

+ 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