ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I disable save prompt when exiting a sheet? (https://www.excelbanter.com/excel-discussion-misc-queries/179411-how-do-i-disable-save-prompt-when-exiting-sheet.html)

Copter32

How do I disable save prompt when exiting a sheet?
 
I have hyperlinked sheets within a file. When you exit from sheet 2 or 3 or
.... , there is a save file prompt. I do not wih viewers to do this, even
though read only protected, one can still save a copy called "copy of
filemame". Is one able to disable this prompt? Thanks!

FSt1

How do I disable save prompt when exiting a sheet?
 
hi
you could try this. but be warned....the file will close without saving
changes!
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveWorkbook.Close savechanges:=False
End Sub

regards
FSt1

"Copter32" wrote:

I have hyperlinked sheets within a file. When you exit from sheet 2 or 3 or
... , there is a save file prompt. I do not wih viewers to do this, even
though read only protected, one can still save a copy called "copy of
filemame". Is one able to disable this prompt? Thanks!


Gord Dibben

How do I disable save prompt when exiting a sheet?
 
A file is a workbook which consists of one or more worksheets.

You should not get any message when you switch from one worksheet to another
within a workbook.

Did you mean to say you are closing a workbook?


Gord Dibben MS Excel MVP

On Mon, 10 Mar 2008 07:38:03 -0700, Copter32
wrote:

I have hyperlinked sheets within a file. When you exit from sheet 2 or 3 or
... , there is a save file prompt. I do not wih viewers to do this, even
though read only protected, one can still save a copy called "copy of
filemame". Is one able to disable this prompt? Thanks!



Copter32

How do I disable save prompt when exiting a sheet?
 
Gord -
Yes. In fact it is when you close the workbook, not the worksheet. Sorry
the question wasn't as clear as it should have been. Thanks for your
response. Any additional help will be appreciated. Thanks!
Cop

"Gord Dibben" wrote:

A file is a workbook which consists of one or more worksheets.

You should not get any message when you switch from one worksheet to another
within a workbook.

Did you mean to say you are closing a workbook?


Gord Dibben MS Excel MVP

On Mon, 10 Mar 2008 07:38:03 -0700, Copter32
wrote:

I have hyperlinked sheets within a file. When you exit from sheet 2 or 3 or
... , there is a save file prompt. I do not wih viewers to do this, even
though read only protected, one can still save a copy called "copy of
filemame". Is one able to disable this prompt? Thanks!




JP[_4_]

How do I disable save prompt when exiting a sheet?
 
You would use some VBA code, placed in the ThisWorkbook module, such
as

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Me.Saved = True
End Sub

This tells Excel that the file is already saved, so do not display the
save prompt.

For implementation assistance, check out http://www.rondebruin.nl/code.htm

HTH,
JP


On Mar 11, 7:24*am, Copter32
wrote:
Gord -
Yes. In fact it is when you close the workbook, not the worksheet. *Sorry
the question wasn't as clear as it should have been. Thanks for your
response. Any additional help will be appreciated. Thanks!
Cop



Copter32

How do I disable save prompt when exiting a sheet?
 
This really rasies the question of why is the save prompt appearing when you
try to exit when no changes are made. There are no macros that change.
Would an @now formula cause this? This is the only workbook I have on the
system that does this. All others exit directly if no changes have been
made. Thanks to all of you for your valued replies so far.

"Copter32" wrote:

I have hyperlinked sheets within a file. When you exit from sheet 2 or 3 or
... , there is a save file prompt. I do not wih viewers to do this, even
though read only protected, one can still save a copy called "copy of
filemame". Is one able to disable this prompt? Thanks!


Copter32

How do I disable save prompt when exiting a sheet?
 
YEP! Disabled all worksheet calculation dealing with @now() and problem
disappeared. Restructured calculations based on permanent data not on the
ever changing @now and the workbook closeses without the prompt. Thanks all!

"Copter32" wrote:

This really rasies the question of why is the save prompt appearing when you
try to exit when no changes are made. There are no macros that change.
Would an @now formula cause this? This is the only workbook I have on the
system that does this. All others exit directly if no changes have been
made. Thanks to all of you for your valued replies so far.

"Copter32" wrote:

I have hyperlinked sheets within a file. When you exit from sheet 2 or 3 or
... , there is a save file prompt. I do not wih viewers to do this, even
though read only protected, one can still save a copy called "copy of
filemame". Is one able to disable this prompt? Thanks!


JP[_4_]

How do I disable save prompt when exiting a sheet?
 
Yes, Now() is a volatile function. You aren't alone, this happens to
me as well. Sometimes Excel just raises the dirty flag for some
unknown reason.


HTH,
JP


On Mar 12, 10:44*am, Copter32
wrote:
This really rasies the question of why is the save prompt appearing when you
try to exit when no changes are made. *There are no macros that change. *
Would an @now formula cause this? This is the only workbook I have on the
system that does this. *All others exit directly if no changes have been
made. *Thanks to all of you for your valued replies so far.



"Copter32" wrote:
I have hyperlinked sheets within a file. *When you exit from sheet 2 or 3 or
... , there is a save file prompt. *I do not wih viewers to do this, even
though read only protected, one can still save a copy called "copy of
filemame". *Is one able to disable this prompt? Thanks!- Hide quoted text -


- Show quoted text -




All times are GMT +1. The time now is 03:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com