Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

VBA Internet speed

$
0
0

Hi I'm new to this type of scripting however know a bid of VBA and MSaccess. However this is my first project using WMI.

Did a function with pingstatus that went well.

I'm now trying to measure my internet speed on this PC and get the value in MSaccess. I searched around and can now find at least my network adapter.

Function nw()strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery( _"SELECT * FROM Win32_NetworkAdapter WHERE NetConnectionStatus = 2", , 48)
For Each objItem In colItems
    Debug.Print "-----------------------------------"
    Debug.Print "Win32_NetworkAdapter instance"
    Debug.Print "-----------------------------------"
    Debug.Print "Name: " & objItem.Name
Next

End Function


Now what I like to do is get the mom. speed on that adapter 

The same as what you can see on the "windows task manager/networking/networkutilization"

I tried every property in the win32_network adapter but can't find the right one.

All help appreciated. 


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>