View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
William[_2_] William[_2_] is offline
external usenet poster
 
Posts: 227
Default Application quit without displayalerts

Once you close "Personal.xls" the code within that workbook stops executing.

Assuming you have no other workbooks open that may need saving, try.....

Workbooks("Personal.xls").Saved = True
Application.Quit

--
XL2002
Regards

William



"Hari" wrote in message
...
| Hi,
|
| I have a piece of code at the end of which I need to quit excel and in the
| process there are some workbooks which were changed but not meant to be
| saved. Like I use personal macro folder for performing some operations and
| use its output in some other worksheet.
|
| Please note the codes mentioned in this worksheet are part of one of the
| modules in the Personal macro folder.
|
| Im reproducing the last 2 lines of the code here ( excluding sub):-
|
| Application.Quit
| Workbooks("personal.XLS").Close SaveChanges:=False
| End Sub
|
| In the above way the excel closes completely without prompting for changes
| and it also doesnt save the personal folder. Im perfectly happy with this
| and able to get what I want.
|
| Suppose I juggle the above code to :-
|
| Workbooks("personal.XLS").Close SaveChanges:=False
| Application.Quit
| End Sub
|
| In this case personal folder closes witout getting saved but excel doent
| quit. Does that mean that once the workbook close statement is encountered
| then further coding doesnt get processed within the same module.
|
|