Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks that's what i needed
"Chip Pearson" wrote in message ... Olly, First of all, the line of code ThisWorkbook.Saved = True does NOT save the workbook. It tells Excel that the workbook does not need to be saved, but does NOT actually save any changes. Try something like the following: Sub CloseSpreedsheet() Dim Res As Long Res = MsgBox("Do you want to save?", vbYesNoCancel) Select Case Res Case vbYes ThisWorkbook.Save Case vbNo ThisWorkbook.Saved = True Case vbCancel Exit Sub End Select Application.Quit End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i get the option to save changes when i exit | Excel Discussion (Misc queries) | |||
Why does Excel ask to Save on Exit? | Excel Discussion (Misc queries) | |||
Automatic Save and Exit | Excel Discussion (Misc queries) | |||
On Exit, always asked to save | Excel Worksheet Functions | |||
Save & Exit | Excel Worksheet Functions |