+ Reply to Thread
Results 1 to 2 of 2

Disable Save & Update Prompts

  1. #1
    Registered User
    Join Date
    06-27-2005
    Posts
    22

    Question Disable Save & Update Prompts

    I am looking for a way to disable the update prompt when the workbook is opened and disable the save prompt when the workbook is closed.

    1. I know how to disable the update prompt under the tools menu, but that only disables on my pc, when other open the file from their pc it will still prompt them unless that have unchecked it also.

    2. The file is set as read-only so if they do click save it prompts them to save as...etc.

    I would prefer to eliminate these options to my end user so that they don't misclick etc. The file always needs to update so they don't need an option and they never need to save so therefore they don't need an option. Any suggestions are very appreciated.

    Thanks,

    Mike (Nashville)

  2. #2
    Registered User
    Join Date
    02-25-2005
    Posts
    84
    Try this:

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    'Prevents Save dialog box opening (Closes without saving)
    If File = (Dir("C:\ghostfile.txt") <> "") Then ThisWorkbook.Saved = True
    End Sub

    Basically, what it says if 'ghostfile.txt' does not exist then set the workbook saved status to true. Then when the close event happens, it will think you've already just pressed the save button and close without prompting.

    Of course if the file does exist, the save status will stay false and so the prompt will show.

    Careful. With this you need to remember to manually save. I use this regular and in the past have forgotten... and lost all my changes.
    WideMonk

+ 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