PC Review


Reply
Thread Tools Rate Thread

Application.Quit

 
 
BillCPA
Guest
Posts: n/a
 
      21st Oct 2008
I have the following code behind a command button on a user form. The object
is to close the workbook and then quit Excel.

KOMenu.Hide
Application.StatusBar = False
Application.ScreenUpdating = True
ActiveWindow.WindowState = xlMaximized
ActiveWorkbook.Close Savechanges:=False
Application.Quit

It closes the workbook but Excel itself stays open. If I take out the
..Close statement, it quits Excel correctly. Any suggestions on why this
might happening?

--
Bill @ UAMS
 
Reply With Quote
 
 
 
 
Gary''s Student
Guest
Posts: n/a
 
      21st Oct 2008
Once you close the workbook, the macro stops working, so the Quit command is
not even executed.
--
Gary''s Student - gsnu200809


"BillCPA" wrote:

> I have the following code behind a command button on a user form. The object
> is to close the workbook and then quit Excel.
>
> KOMenu.Hide
> Application.StatusBar = False
> Application.ScreenUpdating = True
> ActiveWindow.WindowState = xlMaximized
> ActiveWorkbook.Close Savechanges:=False
> Application.Quit
>
> It closes the workbook but Excel itself stays open. If I take out the
> .Close statement, it quits Excel correctly. Any suggestions on why this
> might happening?
>
> --
> Bill @ UAMS

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.Quit / DoCmd.Quit Fails Ajandco Microsoft Access VBA Modules 4 24th Aug 2007 11:22 PM
Application.Quit / DoCmd.Quit Fails Keith Microsoft Access Form Coding 15 5th Jun 2007 07:33 PM
Aborting threads before quit my application using Application.Exit =?Utf-8?B?VGhhbnlhIFRldXRzY2hiZWlt?= Microsoft Dot NET Compact Framework 24 2nd Mar 2005 03:22 PM
DoCmd.Quit vs. Application.Quit MikeC Microsoft Access VBA Modules 2 6th Oct 2004 05:08 AM
macro to close excel application other than application.quit mary Microsoft Excel Programming 1 14th Sep 2004 03:43 PM


Features
 

Advertising
 

Newsgroups
 


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