Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default exit from excel?

Try:

Application.Quit


Mark J wrote:
how do i exit out of excel after running following code?

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Worksheets("WEDPg1").Select
Application.Run ("HistClient.xla!mnuConvertSheet")
Worksheets("WEDPg2").Select
Application.Run ("HistClient.xla!mnuConvertSheet")
Worksheets("WEDPg3").Select
Application.Run ("HistClient.xla!mnuConvertSheet")
Worksheets("WEDPg4").Select
Application.Run ("HistClient.xla!mnuConvertSheet")
Worksheets("WEDPg5").Select
Application.Run ("HistClient.xla!mnuConvertSheet")
Worksheets("WEDPg6").Select
Application.Run ("HistClient.xla!mnuConvertSheet")
Worksheets("WEDPg7").Select
Application.Run ("HistClient.xla!mnuConvertSheet")


DDate = Format(Now() - 1, "mmddyyyy")
ActiveWorkbook.SaveAs Filename:="" & DDate & ".xls"
ActiveWorkbook.Close


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
Excel 07 won't exit Elle Setting up and Configuration of Excel 0 July 27th 07 12:40 AM
exit excel within vba Murat Demir HEKIMOGLU Excel Programming 1 August 11th 05 02:37 PM
exit excel welshwizzard Excel Discussion (Misc queries) 1 January 18th 05 12:02 AM
If a called sub exit, how to the caller exit right away? luvgreen[_4_] Excel Programming 4 February 24th 04 05:06 PM
Close and Exit Excel MikeWaldron Excel Programming 0 September 8th 03 05:31 PM


All times are GMT +1. The time now is 12:38 AM.

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"