I have the following code and query to get the Sent/Received Bytes from Wlan connection. I want to get the values for each Properties' Item but I get Generic failure
when trying like this:
a = WMIvalues.Item(1).Properties_.Item(1).Value
How would be the correct way to do it?
Sub Test()
Dim WMIvalues As Object
Dim sWQL As String
sWQL = "Select BytesReceivedPersec,BytesSentPersec,BytesTotalPersec from Win32_PerfRawData_Tcpip_NetworkInterface"
Set WMIvalues = GetObject("winmgmts:root/CIMV2").ExecQuery(sWQL)
a = WMIvalues.Item(1).Properties_.Item(1).Value
End Sub