来个示例看看
Private Sub Form_Load()
Dim objWMIService
Dim colItems
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor")
For Each objItem In colItems
Debug.Print "CPU ID: " & objItem.ProcessorId
Next
End Sub
Views: 19