Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 157
Default Application quit without displayalerts

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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Application quit without displayalerts

try

Application.DisplayAlerts = False
ActiveWorkbook.Close savechanges:=False



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Application quit without displayalerts

Application.DisplayAlerts = False
ActiveWorkbook.Close savechanges:=False


  #4   Report Post  
Posted to microsoft.public.excel.programming
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.
|
|


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
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
application.displayalerts is not working will lam Excel Programming 2 April 30th 04 08:21 PM
Application.DisplayAlerts in IE scoobydeux Excel Programming 1 April 19th 04 01:28 AM
Application::DisplayAlerts not working Howard Dierking Excel Programming 2 February 11th 04 12:04 PM
application.displayalerts Erin[_5_] Excel Programming 1 December 4th 03 03:49 PM


All times are GMT +1. The time now is 05:16 PM.

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"