maccten2000
Programmer
Hello All,
I have a VB script which deals in Processes. Basically we are using a third party application that allows you to interact with the Excel object but refuses to kill the object once it has quit excel. I have founda VBS script to fix this problem but would like someone to tell me the error in the code and perhaps if you have the time explain to me the second line and the variables it is taking
The code is
Thanks for your time
I have a VB script which deals in Processes. Basically we are using a third party application that allows you to interact with the Excel object but refuses to kill the object once it has quit excel. I have founda VBS script to fix this problem but would like someone to tell me the error in the code and perhaps if you have the time explain to me the second line and the variables it is taking
The code is
Code:
strComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersona te}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = 'EXCEL.EXE'")
Dim Counter
Counter = 0
For Each objProcess in colProcessList
Counter = Counter +1
if Counter = colProcessList.count Then
objProcess.Terminate()
End if
Next
Thanks for your time