Process will not end from task manager after vba code is over

S

streamaxi

There is one process (acsSRV.exe) in the Task Manager that does not
want to end even if set to nothing.
Any ideas???

Dim cvsApp As Object
Dim cvsConn As Object
Dim cvsSrv As Object
Dim Rep As Object


Dim Info As Object, Log As Object, b As Object


Set cvsApp = CreateObject("ACSUP.cvsApplication")
Set cvsConn = CreateObject("ACSCN.cvsConnection")
Set cvsSrv = CreateObject("ACSUPSRV.cvsServer")
Set Rep = CreateObject("ACSREP.cvsReport")


..
..
..
..
My code
..
..
..
..


Set b = Nothing
Set Log = Nothing
Set Info = Nothing
Set Rep = Nothing
Set cvsSrv = Nothing
Set cvsConn = Nothing
Set cvsApp = Nothing
 
J

Jim Thomlinson

Close the objects prior to setting them to nothing. Setting the objects to
nothing just detaches your app from the processes. It does not terminate the
process...
 
J

Jim Thomlinson

I am not familiar with that app but it sould be something like
cvsApp.Close

Note that you must close things in the proper order. For example you may
need to close the connections prior to closing the app otherwise the
processes may get stuck open becuse of the active connection.
 
C

Chip Pearson

Closing the objects depends on the object model of the components. It is
quite likely that the object has a method called "Quit", as does the Excel
Application. So your code would look something like

cvsApp.Quit

You would have to refer to the documentation of the ascSRV.exe application
to determine if it has such a property and what is actual name is (probably
something like "Quit" or "Exit"). Since you're declaring the variables As
Object and using CreateObject to create the objects, you won't find the
proper method in the Object Browser.

You might try to use early binding instead of late binding. In the VBA
Editor, go to the Tools menu and choose References. Scroll through the list
and see if your "ACSUP" library is listed. If so, check it. Then open the
Object Browser (F2) and select that library in the top dropdown list. This
will display all the properties and methods of that object. Look for a
method called "Quit" or "Exit" or something like that. If you find it, use
that method in your code:

cvsApp.Quit

As Jim correctly pointed out, setting the object to Nothing doesn't
terminate anything. It just releases a reference to the object.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com
(email address is on the web site)
 
S

streamaxi

My friend told me that you have to set object to nothing in reverse
order so that is what I did.

Regarding closing the object, I tried .close .quit .exit .flush
(nothing worked) This application is Avaya CMS Supervisor R13 used by
BPO/Call Center/ITES industries.

The issue is still unresolved.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top