Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
no updates prompt at opening and save changes at closing
I couldn't find anything in this regard on help menu, but if it is possible
in excel, I'd like to know if I can make a book which when closing shouldn't ask for save changes or is it really not possible, I'd appreciate any replies in this regard. SHARIQ thanks in advance |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
no updates prompt at opening and save changes at closing
Only with VBA,
Hit Ctrl an F11 to open the VB editor, double click 'This Workbook' and copy and paste this code into it, Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) ThisWorkbook.Saved = True End Sub Bear in mind that if someone opens the workbook with macro's disabled they can do as they wish. There are ways to overcome that too, but Excel protection of all kinds is weak and can be easily circumvented. Regards, Alan. "Shariq" wrote in message ... I couldn't find anything in this regard on help menu, but if it is possible in excel, I'd like to know if I can make a book which when closing shouldn't ask for save changes or is it really not possible, I'd appreciate any replies in this regard. SHARIQ thanks in advance |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
no updates prompt at opening and save changes at closing
Do you want the workbook to close and save or just close without saving?
This code will save the workbook with changes and no prompt. Private Sub Workbook_BeforeClose(Cancel As Boolean) ActiveWorkbook.Save End Sub This wiill close with no save and no prompt. Private Sub Workbook_BeforeClose(Cancel As Boolean) ThisWorkbook.Saved = True End Sub Gord Dibben MS Excel MVP On Mon, 8 Jan 2007 16:30:01 -0800, Shariq wrote: I couldn't find anything in this regard on help menu, but if it is possible in excel, I'd like to know if I can make a book which when closing shouldn't ask for save changes or is it really not possible, I'd appreciate any replies in this regard. SHARIQ thanks in advance |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
no updates prompt at opening and save changes at closing
Hi Alan!
Well, first of all I'd like to thank you, that you replied to my question, but some how the result I was looking for hasen't been achieved, or may be my question wasen't clear enough, so if you care to answer to my question once again please, the question is. When I close only this certain workbook it should'nt ask for save changes but just closes its not important if changes made in the book are saved or not (like for instance automatically) or so, so what you told about VBA system, SO may be I didn't understand what it is, because I pressed CTRL + F11 by doing so a new sheet got added to the book a macro 1 I copied and pasted what you had suggested but it didn't work, so please can yu educate me on this as how to do it properly, thanx Shariq "Alan" wrote: Only with VBA, Hit Ctrl an F11 to open the VB editor, double click 'This Workbook' and copy and paste this code into it, Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) ThisWorkbook.Saved = True End Sub Bear in mind that if someone opens the workbook with macro's disabled they can do as they wish. There are ways to overcome that too, but Excel protection of all kinds is weak and can be easily circumvented. Regards, Alan. "Shariq" wrote in message ... I couldn't find anything in this regard on help menu, but if it is possible in excel, I'd like to know if I can make a book which when closing shouldn't ask for save changes or is it really not possible, I'd appreciate any replies in this regard. SHARIQ thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is it possible to diable save change at closing the workbook | Excel Discussion (Misc queries) | |||
How do I save personal menu bar settings when closing program | Setting up and Configuration of Excel | |||
Save Changes Prompt | Excel Worksheet Functions | |||
how to disable save prompt on closing excel file in automated mode | Excel Discussion (Misc queries) | |||
Save prompt for Excel 2003 | Setting up and Configuration of Excel |