?
Solved

EXCEL OBJECTS FROM VISUAL BASIC

Posted on 2003-03-18
6
Medium Priority
?
154 Views
Last Modified: 2013-11-25
Hello Gurus,
I am refrencing Excel Object Library from my VB dll's.
Once in a blue moon I am seeing dangling Excel Objects, even though I think I am taking good care to close all the objects in regular and exception cases.
Is there a way to clean Excel objects from the task bar using Visual Basic ?
Please let me know.
Thanks.
0
Comment
Question by:vb_virgin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Author Comment

by:vb_virgin
ID: 8160490
Sorry .. I meant Task Manager and not Taskbar.
Thanks
0
 
LVL 1

Accepted Solution

by:
SpineyNorman earned 80 total points
ID: 8161203
Try something like this out

Dim xls As Excel.Application

On Error GoTo errCantCreate
Do
    Set xls = GetObject(, "Excel.Application")
    xls.Quit
    Set xls = Nothing
Loop
errCantCreate:
MsgBox "done"
End Sub
0
 
LVL 6

Expert Comment

by:DominicCronin
ID: 8161358
Indeed Spiney is right. It's a very annoying feature of Excel that if you don't call .quit, the application sticks around and messes up your life.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:SpineyNorman
ID: 8211864
vb_virgin,
Has this worked for you?
0
 

Expert Comment

by:CleanupPing
ID: 8532064
Hi vb_virgin,
This old question (QID 20554981) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0
 
LVL 6

Expert Comment

by:DominicCronin
ID: 8536031
Recommend points to SpineyNorman
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question