LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 361
Default Application.Quit Not Working in Office 2007

I have used the following code to shut down Excel 2003 when the workbook is
closed but now that I am using Excel 2007 it no longer closes Excel, only the
active workbook. I have tried everything to no avail and have the same
results whether the workbook is in 2003 or 2007 format. Thanks in advance,
Carl

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim oCtrl As Office.CommandBarControl
For Each oCtrl In Application.CommandBars.FindControls(ID:=21)
oCtrl.Enabled = True
Next oCtrl
Application.DisplayFullScreen = False
Application.Quit
End Sub
 
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
Office 2007 compatibility at office 2003 is not working for graphs Vinod[_2_] Excel Discussion (Misc queries) 0 December 4th 07 06:17 PM
Application.Quit in Excel 2007 Paul D.[_2_] Excel Programming 4 June 1st 07 05:49 AM
Please free the Application Windows in Office 2007 DaveEv Excel Discussion (Misc queries) 0 October 22nd 06 12:29 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


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