Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Closing workbooks w/o closing Excel | Excel Discussion (Misc queries) | |||
Closing Excel | New Users to Excel | |||
Closing Excel with Red X | Excel Discussion (Misc queries) | |||
Closing Excel | New Users to Excel | |||
Closing Excel | Excel Discussion (Misc queries) |