Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShaneGowland/5544763 to your computer and use it in GitHub Desktop.
Save ShaneGowland/5544763 to your computer and use it in GitHub Desktop.
Determine if an internet connection is available
Private Declare Function InternetCheckConnection Lib "wininet.dll" _
Alias "InternetCheckConnectionA" (ByVal lpszUrl As String, ByVal dwFlags As Long, ByVal dwReserved As Long) As Boolean
Private Function InternetConnectionAvailable() As Boolean
Return InternetCheckConnection("http://www.google.com", 1, 0)
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment