Computing Staff
  • 0

Test Wifi Signal Strength Using Excel VBA

  • 0

Hi there,

I’ve built an app in VBA (Excel 2007) which is a portable application. It can work in a number of locations and will occasionally need to transfer files to a cloud server. I can test to see if a wifi signal is available or not. The problem is I can’t tell how good the signal is and this sometimes fails if the strength is low.

Is there any vba code which can determine if the signal is low, good or excellent?

Again, thanks in anticipation.

Share

1 Answer

  1. If IsNull(oRetStatus.StatusCode) Or oRetStatus.StatusCode <> 0 Then
        sPing = False
    Else
        sPing = True
    End If

    Note: This can be rewritten as:

    sPing = oRetStatus.StatusCode = 0 And Not IsNull(oRetStatus.StatusCode)

    Function sPing(sHost) As String

    Also, you’re returning a Boolean, so you should probably fix your function deceleration.

    Time for good news / bad news.
    Good: I found a WMI class you might be able to use: http://blogs.technet.com/b/heyscrip…

    Bad: This WMI class is not publicly documented, so its implementation is hit and miss. If you need this to work on a number of machines, you’re left with the Windows API.

    How To Ask Questions The Smart Way

    • 0