Disable Save & Update Prompts

M

miwarren

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)
 
W

widemonk

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 th
workbook saved status to true. Then when the close event happens, i
will think you've already just pressed the save button and clos
without prompting.

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top