End a process by name using WMI.
strProcess = "excel.exe"
strComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\" & strComputer & "
ootcimv2")
Set colProcessList = objWMIService.ExecQuery _
("SELECT * FROM Win32_Process WHERE Name = '" & strProcess & "'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next