![]() |
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 |
All times are GMT +1. The time now is 12:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com