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


"Bill" wrote in message
...
I'm having a great deal of difficulty getting Excel to
cease and desist after donating some of its data to an
Autocad drawing-
(Autocad 2000, Windows 2000)


Here are the declarations for reference:

Dim excelApp As Excel.Application
Dim wbkObj As Workbook


Here's my quit method (no changes are made to the excel
file, makes no difference whether I open read only or not):

excelApp.DisplayAlerts = False
wbkObj.Close
excelApp.Quit

Set wbkObj = Nothing
Set excelApp = Nothing

If I look at Windows task manager, EXCEL.EXE is still
listed in the processes window, and if I attempt to open
the xl file in explorer, excel hangs. If I force the
process to terminate through task manager, all returns to
normal. Somehow my app is simply unable to make excel go
away!

I know I've seen references to this problem before while
browsing the web, but for the life of me I haven't been
able to re-locate them.


This can happen if some object in Excel isnt released
If you have used any other object either inside or
external to Excel such as Worksheet, range or scripting object
ensure you release it by setting it to nothing.

Keith


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Closing Excel in VBA

Thanks Paul & Keith- I finally got it. Keith was right, I still had an
obscure attachment. There was a Set Array pointing to the spreadsheet
that did not release with the Erase method (can't Set an array to
"Nothing" so was using erase).

Excel still stays in task manager but dissappears when the VBA project
is unloaded.

Bill



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Closing workbooks w/o closing Excel Barb in MD Excel Discussion (Misc queries) 3 February 15th 10 06:42 PM
Closing Excel RVarner New Users to Excel 1 May 24th 09 04:06 PM
Closing Excel with Red X lroboat Excel Discussion (Misc queries) 3 September 10th 07 02:29 PM
Closing Excel Marvin Kornblau New Users to Excel 1 January 7th 07 12:57 AM
Closing Excel Chad Excel Discussion (Misc queries) 2 March 18th 05 03:57 PM


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