Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Private Declare Function InternetGetConnectedStateEx Lib "wininet.dll" (ByRef lpdwFlags As Long, ByVal lpszConnectionName As String, ByVal dwNameLen As Integer, ByVal dwReserved As Long) As Long
'Testing for internet connection
Public Function IsInternetConnected() As Boolean
IsInternetConnected = InternetGetConnectedStateEx(0, "", 254, 0)
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment