Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Code to Quit App Doesn't Work

This may be of help

Sub SaveAllAndQuit()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each wb In Application.Workbooks
wb.Save
Next wb
Application.Quit
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Sheldon" wrote in message
...
Hello -

I have a workbook that automatically imports tables from a database via
code
and is set with the Windows scheduler.

When it's done importing, I want it to close the workbook and quit the
application. At the end of the import code, I placed the following:

ActiveWorkbook.Close
Application.Quit

It doesn't close and the application doesn't quit. How can I get it to do
that?
--
Sheldon


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
Code does not work Jerry Foley Excel Programming 5 February 26th 07 10:46 PM
Why QUIT method doesn't work after COPY method? surotkin Excel Programming 3 October 26th 05 04:32 PM
vba advice how 2get a input box to quit by entering the word quit+ 4 a msgbox to disp RELWOD85[_4_] Excel Programming 3 August 1st 05 07:11 PM
vba code doesn't work lschuh Excel Programming 24 July 22nd 05 06:45 PM
Excel don't quit in ASP.net Code Andreas Friedrichs Excel Programming 0 January 7th 04 12:16 PM


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