'判断某一个进程是否运行
Sub test()
Dim wmi As Object
Dim objs As Object
Dim obj As Object
Dim Process As String
Dim bol As String
Set wmi = GetObject("WinMgmts:")
Set objs = wmi.InstancesOf("Win32_Process")
Process = "QQ.exe" '区分大小写
For Each obj In objs
If obj.Description = Process Then bol = True: Exit For
Next
MsgBox bol, , Process
End Sub