With GetObject("winmgmts:\\.\root\cimv2")
For Each x In .ExecQuery("Select * From Win32_DisplayConfiguration")
MsgBox "Horizontal resolution: " & x.PelsWidth
MsgBox "Vertical resolution: " & x.PelsHeight
MsgBox "Name: " & x.DeviceName
MsgBox "Color depth: " & x.BitsPerPel
Next
End With