Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ken Ken is offline
external usenet poster
 
Posts: 207
Default suppressing "do you want to save changes..."

I recentely started to get prompted "Do you want to save the changes to
*.xls?" regardless of whether or not I made any changes. I have many
users who now receive the prompt for files that they did not even know
they had opened. Those are hidden files that contain code and data
that are opened via an add-in that I wrote and people have used for
years without even being aware the hidden files even existed. I believe
this just started happening with a server upgrade (to 2003). Does
anyone know of a setting somewhere that could be set to always prompt
for saving changes, even when no changes were made? Or, alternatively,
is there something I could put in the code to suppress that warning on
certain files?

Thanks

Ken

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default suppressing "do you want to save changes..."

If you know, absolutely, that you never want a user to be prompted to "save
changes" add this code to the ThisWorkbook module of the workbook:

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

--
Jim
"Ken" wrote in message
oups.com...
I recentely started to get prompted "Do you want to save the changes to
*.xls?" regardless of whether or not I made any changes. I have many
users who now receive the prompt for files that they did not even know
they had opened. Those are hidden files that contain code and data
that are opened via an add-in that I wrote and people have used for
years without even being aware the hidden files even existed. I believe
this just started happening with a server upgrade (to 2003). Does
anyone know of a setting somewhere that could be set to always prompt
for saving changes, even when no changes were made? Or, alternatively,
is there something I could put in the code to suppress that warning on
certain files?

Thanks

Ken



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default suppressing "do you want to save changes..."

Hi

You could try either

Application.DisplayAlerts = False
ActiveWorkbook.Saved = True

in your workbookclose event

s

Ken wrote:
I recentely started to get prompted "Do you want to save the changes to
*.xls?" regardless of whether or not I made any changes. I have many
users who now receive the prompt for files that they did not even know
they had opened. Those are hidden files that contain code and data
that are opened via an add-in that I wrote and people have used for
years without even being aware the hidden files even existed. I believe
this just started happening with a server upgrade (to 2003). Does
anyone know of a setting somewhere that could be set to always prompt
for saving changes, even when no changes were made? Or, alternatively,
is there something I could put in the code to suppress that warning on
certain files?

Thanks

Ken


  #4   Report Post  
Posted to microsoft.public.excel.programming
Ken Ken is offline
external usenet poster
 
Posts: 207
Default suppressing "do you want to save changes..."

Thanks Jim and s

saved=true in the before close event takes care of most of my problem.
It took me a little while to get a hidden file saved with that code in
it, but, I was eventually able to save my "addin data" file through
code in another workbook while "addin data" data was hidden.

I wish I knew why this started happening. All Excel files on one
particular server trigger the "save changes" prompt, regardless of
whether or not there have been changes.

Thanks

again.

Ken



Jim Rech wrote:
If you know, absolutely, that you never want a user to be prompted to "save
changes" add this code to the ThisWorkbook module of the workbook:

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

--
Jim
"Ken" wrote in message
oups.com...
I recentely started to get prompted "Do you want to save the changes to
*.xls?" regardless of whether or not I made any changes. I have many
users who now receive the prompt for files that they did not even know
they had opened. Those are hidden files that contain code and data
that are opened via an add-in that I wrote and people have used for
years without even being aware the hidden files even existed. I believe
this just started happening with a server upgrade (to 2003). Does
anyone know of a setting somewhere that could be set to always prompt
for saving changes, even when no changes were made? Or, alternatively,
is there something I could put in the code to suppress that warning on
certain files?

Thanks

Ken


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default suppressing "do you want to save changes..."

I was eventually able to save my "addin data" file through code in another
workbook while "addin data" data was hidden.


I find the easiest way to save a workbook that is hidden is in the VBE.
Select the workbook in the VBE's Project Explorer and then click the Save
button on the VBE Standard toolbar.

I wish I knew why this started happening


You didn't add any volatile functions like NOW or OFFSET or INDIRECT, did
you? They are always automatically calced when a workbook that has them is
opened. So Excel thinks changes have been made.

--
Jim
"Ken" wrote in message
oups.com...
Thanks Jim and s

saved=true in the before close event takes care of most of my problem.
It took me a little while to get a hidden file saved with that code in
it, but, I was eventually able to save my "addin data" file through
code in another workbook while "addin data" data was hidden.

I wish I knew why this started happening. All Excel files on one
particular server trigger the "save changes" prompt, regardless of
whether or not there have been changes.

Thanks

again.

Ken



Jim Rech wrote:
If you know, absolutely, that you never want a user to be prompted to
"save
changes" add this code to the ThisWorkbook module of the workbook:

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

--
Jim
"Ken" wrote in message
oups.com...
I recentely started to get prompted "Do you want to save the changes to
*.xls?" regardless of whether or not I made any changes. I have many
users who now receive the prompt for files that they did not even know
they had opened. Those are hidden files that contain code and data
that are opened via an add-in that I wrote and people have used for
years without even being aware the hidden files even existed. I believe
this just started happening with a server upgrade (to 2003). Does
anyone know of a setting somewhere that could be set to always prompt
for saving changes, even when no changes were made? Or, alternatively,
is there something I could put in the code to suppress that warning on
certain files?

Thanks

Ken






  #6   Report Post  
Posted to microsoft.public.excel.programming
Ken Ken is offline
external usenet poster
 
Posts: 207
Default suppressing "do you want to save changes..."

Jim
Saving in VBE is good to know. Thanks again.
There has definitely not been a change to my addin data file, as it has
been opening, not visible, and closing without people knowing about it
for years. That is the file that has triggered all the calls since
users are prompted to save something they don't know they have open.
It happens on every file on one particular server and not on the
others, and it just started in the last week. Thre must be a setting
somewhere that says to bother people about saving files that don't need
to be saved.
Thanks
Ken


Jim Rech wrote:
I was eventually able to save my "addin data" file through code in another
workbook while "addin data" data was hidden.


I find the easiest way to save a workbook that is hidden is in the VBE.
Select the workbook in the VBE's Project Explorer and then click the Save
button on the VBE Standard toolbar.

I wish I knew why this started happening


You didn't add any volatile functions like NOW or OFFSET or INDIRECT, did
you? They are always automatically calced when a workbook that has them is
opened. So Excel thinks changes have been made.

--
Jim
"Ken" wrote in message
oups.com...
Thanks Jim and s

saved=true in the before close event takes care of most of my problem.
It took me a little while to get a hidden file saved with that code in
it, but, I was eventually able to save my "addin data" file through
code in another workbook while "addin data" data was hidden.

I wish I knew why this started happening. All Excel files on one
particular server trigger the "save changes" prompt, regardless of
whether or not there have been changes.

Thanks

again.

Ken



Jim Rech wrote:
If you know, absolutely, that you never want a user to be prompted to
"save
changes" add this code to the ThisWorkbook module of the workbook:

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

--
Jim
"Ken" wrote in message
oups.com...
I recentely started to get prompted "Do you want to save the changes to
*.xls?" regardless of whether or not I made any changes. I have many
users who now receive the prompt for files that they did not even know
they had opened. Those are hidden files that contain code and data
that are opened via an add-in that I wrote and people have used for
years without even being aware the hidden files even existed. I believe
this just started happening with a server upgrade (to 2003). Does
anyone know of a setting somewhere that could be set to always prompt
for saving changes, even when no changes were made? Or, alternatively,
is there something I could put in the code to suppress that warning on
certain files?

Thanks

Ken



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting "Save As" adds "Copy of" to file name- MS Excel 2007 ronhansen Excel Discussion (Misc queries) 1 November 15th 09 09:33 PM
"CELL("FILENAME") NOT UPDATE AFTER "SAVE AS" ACTION yossie6 Excel Discussion (Misc queries) 1 June 16th 08 12:16 PM
"Save" and "Save As" options greyed out - "Save as Webpage" option Bill Excel Discussion (Misc queries) 0 January 16th 07 04:47 PM
"Subscript out of range" error for: Workbooks("Test1.xls").Save Just12341234 Excel Programming 2 June 17th 05 03:16 PM
save and restore "Workbook Menu Bar" & "Cell" menus Jeff Higgins Excel Programming 2 February 14th 05 01:33 AM


All times are GMT +1. The time now is 10:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"