Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default Don't ask to save changes

What code should I use so that excel won't ask me to Save Changes? Where do
I put it?
--
Thanks
Shawn
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 363
Default Don't ask to save changes

Sub CloseandSave()
Application.DisplayAlerts = False
Application.ActiveWorkbook.Save
If Workbooks.Count 1 Then
Application.ActiveWorkbook.Close
Else
Application.Quit
End If
Application.DisplayAlerts = True
End Sub



Checks to see if anyother workbooks are opend, if YSE then SAVES & Closes without Prompt.
If ONLY workbook opened, then SAVES & QUITS Excel withoput a prompt.

Corey....

"Shawn" wrote in message
...
What code should I use so that excel won't ask me to Save Changes? Where do
I put it?
--
Thanks
Shawn


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default Don't ask to save changes

I pasted your code into my "ThisWorkbook" object and made some chages to the
spreadsheet then clicked the "x" to close the program and it still prompted
me to save changes???
--
Thanks
Shawn


"Corey" wrote:

Sub CloseandSave()
Application.DisplayAlerts = False
Application.ActiveWorkbook.Save
If Workbooks.Count 1 Then
Application.ActiveWorkbook.Close
Else
Application.Quit
End If
Application.DisplayAlerts = True
End Sub



Checks to see if anyother workbooks are opend, if YSE then SAVES & Closes without Prompt.
If ONLY workbook opened, then SAVES & QUITS Excel withoput a prompt.

Corey....

"Shawn" wrote in message
...
What code should I use so that excel won't ask me to Save Changes? Where do
I put it?
--
Thanks
Shawn



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
Save, save as, page setup dimmed out in unprotected excel sheet? ccKeithJ Excel Discussion (Misc queries) 3 December 14th 07 07:07 PM
disable save and saveas from menubar and save via command button Steve E Excel Programming 5 September 13th 06 11:51 PM
Disable save, save as, but allow save via command button TimN Excel Programming 10 September 1st 06 07:05 PM
How to diasble save and save as menu but allow a save button hon123456 Excel Programming 1 June 12th 06 09:50 AM
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: harpscardiff[_10_] Excel Programming 8 November 10th 05 12:24 PM


All times are GMT +1. The time now is 01:45 AM.

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"