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

Thanks for any help. I am running a macro that saves all workbooks and then
does application.quit. Excel opens and closes the VisualBasic window. Since
others will be using this macro, I wish to elimanate this opening/closing.
Thanks for the hlep.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Application.quit


You should always post YOUR macro for comments. Try this

Sub CLOSE_ALL()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each w In Application.Workbooks
If w.Name < ThisWorkbook.Name Then
w.Save
w.Close
End If
Next w
ThisWorkbook.Save
Application.Quit
End Sub


--
Don Guillett
SalesAid Software

"OlieH" wrote in message
...
Thanks for any help. I am running a macro that saves all workbooks and
then
does application.quit. Excel opens and closes the VisualBasic window.
Since
others will be using this macro, I wish to elimanate this opening/closing.
Thanks for the hlep.



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

Don, thanks for the help. Your macro worked for a couple of days but now the
Application.DisplayAlerts will not reset to False.
What have I done to cause this?

Thanks again for your help.
OlieH

"Don Guillett" wrote:


You should always post YOUR macro for comments. Try this

Sub CLOSE_ALL()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each w In Application.Workbooks
If w.Name < ThisWorkbook.Name Then
w.Save
w.Close
End If
Next w
ThisWorkbook.Save
Application.Quit
End Sub


--
Don Guillett
SalesAid Software

"OlieH" wrote in message
...
Thanks for any help. I am running a macro that saves all workbooks and
then
does application.quit. Excel opens and closes the VisualBasic window.
Since
others will be using this macro, I wish to elimanate this opening/closing.
Thanks for the hlep.




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
Application.Quit Henry Hayden Excel Programming 0 December 7th 05 03:55 PM
difference application.quit & application.close Pierre via OfficeKB.com[_2_] Excel Programming 4 November 8th 05 07:55 PM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
Application.quit yuiriy Excel Programming 4 June 10th 04 08:36 AM
application.quit will not shut off application john Excel Programming 0 January 9th 04 11:29 PM


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

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"