LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Won't Unload...


I have an app that has a couple grids. If I load either grid from a
Excel file, no matter what I've tried, Excel will close, but no
disappear from the task manager.

I was getting all kinds of strange errors; and sometimes my cod
worked, sometimes it didn't. I finally figured out that EXCEL.EXE wa
still running (in task manager), and if I tried to load another gri
from an Excel file I'd get errors. For example, I had severa
formatting commands that sometimes worked - but ONLY if I loaded tha
grid FIRST.

Anyways, I am opening Excel, and asking for a file name, doing stuff
then want to close via code in a sub when I'm done:

Set objExcel = CreateObject("Excel.Application")
Set objBook = objExcel.Workbooks.Add
Set objSheet = objExcel.Sheets(1)
< save as xxx

to close:

objExcel.DisplayAlerts = False

' objBook.Close(SaveChanges:=False) ' <-- ** or True **

ActiveWorkbook.Close False
ThisWorkbook.Close
objExcel.Close
objExcel.Quit

Set objExcel = Nothing
Set objSheet = Nothing
Set objBook = Nothing

Tyring all kinds of stuff - but EXCEL.EXE still in task manager! An
ideas? Thanks

--
Steven8
-----------------------------------------------------------------------
Steven8R's Profile: http://www.excelforum.com/member.php...fo&userid=1548
View this thread: http://www.excelforum.com/showthread.php?threadid=27064

 
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
How do I remove (not unload) a user installed Excel add-in ? bill h Excel Discussion (Misc queries) 1 March 1st 10 09:16 PM
Is there a way to unload the loaded XLL file in Excel? Hi all, I amdebugging XLL link library using Visual C++. Everytime I rebuild the XLL, Ihave to close the whole Excel program and relaunch the Excel program again,and then load in the newly gene LunaMoon Excel Discussion (Misc queries) 0 July 28th 08 11:03 PM
How to unload a form in excel vba? Edward[_7_] Excel Programming 2 September 30th 04 04:39 PM
Unload Me Chip Pearson Excel Programming 0 September 5th 03 12:56 AM
Form Unload Khai[_2_] Excel Programming 0 August 4th 03 09:28 PM


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