Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Killing Excel :)

Hi ,

I use the task scheduler to run Excel Macros nightly.

Each morning I have to kill Excel process :(

However, I use 'Application.quit' syntax at the end of each macro and I set
ObjXl=Nothing

How can I automatically kill the process or what can be done to avoid this
'Excel TSR' ?

OS:Win2000
Excel 2000

TIA,
Nicky.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Killing Excel :)

Hi Nicolas,

Are you trying to close Excel from within Excel VBA? If so, you may want to
do something like this before you invoke the Quit method:

Sub PrepareToQuit()
Dim wb As Workbook

For Each wb In Workbooks
wb.Saved=True
Next wb
End Sub

That will mark all open workbooks as saved already, so Excel shouldn't hang
out in the background when you Quit. Of course, if you actually want to
save any of the files, you should do that explicitly.

--
Regards,

Jake Marx
www.longhead.com

Nicolas Mainczyk wrote:
Hi ,

I use the task scheduler to run Excel Macros nightly.

Each morning I have to kill Excel process :(

However, I use 'Application.quit' syntax at the end of each macro and
I set ObjXl=Nothing

How can I automatically kill the process or what can be done to avoid
this 'Excel TSR' ?

OS:Win2000
Excel 2000

TIA,
Nicky.


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
Simple problem for you all....killing me though [email protected] Excel Discussion (Misc queries) 5 July 16th 07 01:26 PM
Expiring/Killing Macro(s) FARAZ QURESHI Excel Discussion (Misc queries) 5 January 8th 07 08:20 PM
Data collation killing me!! rhani111 Excel Worksheet Functions 19 August 10th 06 02:13 AM
Finding and killing all Access queries in an Excel spreadsheet travis Links and Linking in Excel 1 December 13th 05 03:01 AM
VBA loop is killing me! Dave Bailey Excel Discussion (Misc queries) 1 October 14th 05 07:43 AM


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