Check for active internet connection

前端 未结 1 1709
离开以前
离开以前 2021-02-09 03:55

Wrote a small app that accesses a bunch of search websites and puts the results in a word document, which gets run a few hundred times a day.

It saves individual search

1条回答
  •  被撕碎了的回忆
    2021-02-09 04:57

    You could use MSXML library & use XMLHttpRequest class to check for things

    e.g.

    On Error Resume Next
    Dim request As MSXML2.XMLHTTP60
    request.Open "http://www.google.com"
    request.Send
    Msgbox request.Status
    

    The status will give you HTTP Status code of what happened to the request. You might have to do some more checks, depending on your scenario.

    Hope that helps.

    0 讨论(0)
提交回复
热议问题