I am looking to replace something like
withVB Code:
Private Sub Form_Load() Dim Row As Object For Each Row In GetObject("winmgmts:\\127.0.0.1\root\CIMV2"). _ ExecQuery("SELECT ScreenHeight,ScreenWidth FROM Win32_DesktopMonitor", "WQL", &H10 + &H20) Debug.Print "ScreenHeigh", Row.ScreenHeight Debug.Print "ScreenWidth", Row.ScreenWidth Next End Sub
VB Code:
Private Sub Form_Load() Dim Row As Object Dim Col As Object For Each Row In GetObject("winmgmts:\\127.0.0.1\root\CIMV2"). _ ExecQuery("SELECT ScreenHeight,ScreenWidth FROM Win32_DesktopMonitor", "WQL", &H10 + &H20) For Each Col In Row Debug.Print Key(Col), Value(Col) Next Next End Sub
Second example don't wanna work.
Edit: fixed a typ0.


Reply With Quote