Public Function KillProcess(Processo As String)
'O nome do processo é case sensitive
'Exemplo: WINWORD.EXE / EXCEL.EXE / wordpad.exe / etc
Dim oServ As Object
Dim cProc As Variant
Dim oProc As Object
Set oServ = GetObject("winmgmts:")
Set cProc = oServ.ExecQuery("Select * from Win32_Process")
For Each oProc In cProc
If oProc.Name = Processo Then errReturnCode = oProc.Terminate()
Next
End Function