Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Save file dialog box in Excel

When working on a document I clicked on the x to close the worksheet and I
got the usual dialogue and instead of clicking yes to save it I accidentally
selected no.

I know this question is far-fetched but I thought I would ask it anyway. Is
there any Excel options that can be set to prompt you again.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default Save file dialog box in Excel

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Cancel = True
Application.EnableEvents = False
If MsgBox("Save the file", vbYesNo) = vbYes Then
ThisWorkbook.Save
Else
If MsgBox("ARe you sure you don't want to save the file", vbYesNo) =
vbNo Then
ThisWorkbook.Save
End If
End If

End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"falcios" wrote in message
...
When working on a document I clicked on the x to close the worksheet and I
got the usual dialogue and instead of clicking yes to save it I
accidentally
selected no.

I know this question is far-fetched but I thought I would ask it anyway.
Is
there any Excel options that can be set to prompt you again.

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,718
Default Save file dialog box in Excel

Re-enable events?

--
Jim
"Bob Phillips" wrote in message
...
| Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
| Boolean)
| Cancel = True
| Application.EnableEvents = False
| If MsgBox("Save the file", vbYesNo) = vbYes Then
| ThisWorkbook.Save
| Else
| If MsgBox("ARe you sure you don't want to save the file", vbYesNo)
=
| vbNo Then
| ThisWorkbook.Save
| End If
| End If
|
| End Sub
|
| 'This is workbook event code.
| 'To input this code, right click on the Excel icon on the worksheet
| '(or next to the File menu if you maximise your workbooks),
| 'select View Code from the menu, and paste the code
|
|
| --
| ---
| HTH
|
| Bob
|
| (there's no email, no snail mail, but somewhere should be gmail in my
addy)
|
|
|
| "falcios" wrote in message
| ...
| When working on a document I clicked on the x to close the worksheet and
I
| got the usual dialogue and instead of clicking yes to save it I
| accidentally
| selected no.
|
| I know this question is far-fetched but I thought I would ask it anyway.
| Is
| there any Excel options that can be set to prompt you again.
|
| Thanks.
|
|


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default Save file dialog box in Excel

Thank-you, it would be a good idea.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Jim Rech" wrote in message
...
Re-enable events?

--
Jim
"Bob Phillips" wrote in message
...
| Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
| Boolean)
| Cancel = True
| Application.EnableEvents = False
| If MsgBox("Save the file", vbYesNo) = vbYes Then
| ThisWorkbook.Save
| Else
| If MsgBox("ARe you sure you don't want to save the file",
vbYesNo)
=
| vbNo Then
| ThisWorkbook.Save
| End If
| End If
|
| End Sub
|
| 'This is workbook event code.
| 'To input this code, right click on the Excel icon on the worksheet
| '(or next to the File menu if you maximise your workbooks),
| 'select View Code from the menu, and paste the code
|
|
| --
| ---
| HTH
|
| Bob
|
| (there's no email, no snail mail, but somewhere should be gmail in my
addy)
|
|
|
| "falcios" wrote in message
| ...
| When working on a document I clicked on the x to close the worksheet
and
I
| got the usual dialogue and instead of clicking yes to save it I
| accidentally
| selected no.
|
| I know this question is far-fetched but I thought I would ask it
anyway.
| Is
| there any Excel options that can be set to prompt you again.
|
| Thanks.
|
|




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Save file dialog box in Excel

If you are asking if you can get your unsaved work back the answer is no.


Gord Dibben MS Excel MVP

On Mon, 12 Feb 2007 02:46:01 -0800, falcios
wrote:

When working on a document I clicked on the x to close the worksheet and I
got the usual dialogue and instead of clicking yes to save it I accidentally
selected no.

I know this question is far-fetched but I thought I would ask it anyway. Is
there any Excel options that can be set to prompt you again.

Thanks.




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
Excel file with hyperlinks takes a long time to open over the network Didier P Links and Linking in Excel 3 July 4th 06 04:39 PM
Weird File Open/Save As Behavior [email protected] Excel Discussion (Misc queries) 0 December 9th 05 02:26 AM
Excel 2000 cannot save and create temp file GK Setting up and Configuration of Excel 1 October 25th 05 10:33 PM
Excel XP: File name in Title Bar not changed after Save As... Dominic Excel Discussion (Misc queries) 9 August 1st 05 12:58 PM
Can't save new excel file twm7766 Excel Discussion (Misc queries) 3 February 1st 05 11:56 PM


All times are GMT +1. The time now is 05:30 AM.

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

About Us

"It's about Microsoft Excel"