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

Help. I have a macro save my open workbooks and close
them. Can anyone provide a line of code to automatically
end my Excel session.

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Closing Excel

Phil,

Application.Quit

Will shut down Excel.
It needs to be placed instead of the .Close statement (once
your workbook is "Closed", any coding after the .Close
statement will not run.
If you want to insure that the user doesn't get any alerts, use
Application.DisplayAlerts = False
before the .Quit statement.
Be aware that doing so will now quit Excel and close all open
workbooks without prompting for a save.

John

Phil wrote:

Help. I have a macro save my open workbooks and close
them. Can anyone provide a line of code to automatically
end my Excel session.

Thanks in advance.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Closing Excel

Phil,

Application.Quit

--
sb
"Phil" wrote in message
...
Help. I have a macro save my open workbooks and close
them. Can anyone provide a line of code to automatically
end my Excel session.

Thanks in advance.



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
Closing workbooks w/o closing Excel Barb in MD Excel Discussion (Misc queries) 3 February 15th 10 06:42 PM
Closing Excel with Red X lroboat Excel Discussion (Misc queries) 3 September 10th 07 02:29 PM
Closing Excel Diane Excel Discussion (Misc queries) 2 March 24th 05 07:27 PM
Closing Excel Chad Excel Discussion (Misc queries) 2 March 18th 05 03:57 PM
Closing Excel in VBA Keith Willshaw Excel Programming 1 August 15th 03 02:17 PM


All times are GMT +1. The time now is 10:40 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"