Skip to main content

Posts

Showing posts with the label How to Check Internet Connection using VBA

How to Check Internet Connectivity using VBA

The following code snippet uses API functions to check Internet connectivity and also the type of connection : Public Declare Function InternetGetConnectedState _ Lib "wininet.dll" (lpdwFlags As Long, _ ByVal dwReserved As Long) As Boolean Private Declare Function InternetGetConnectedStateEx Lib "wininet.dll" Alias "InternetGetConnectedStateExA" ( _ ByRef lpdwFlags As Long, _ ByVal lpszConnectionName As String, _ ByVal dwNameLen As Long, _ ByVal dwReserved As Long) As Long 'Local system uses a modem to connect to the Internet. Private Const INTERNET_CONNECTION_MODEM As Long = &H1 'Local system uses a LAN to connect to the Internet. Private Const INTERNET_CONNECTION_LAN As Long = &H2 'Local system uses a proxy server to connect to the Internet. Private Const INTERNET_CONNECTION_PROXY As Long = &H4 The following API functions are used Function IsConnected() As Boolea...

Facebook

Facebook Recommendations

Followers


Web Designing In Karachi



Haroof.com


Politics blogs

My Zimbio

Email Subscribe

Enter your email address:

Watch online Live TV

Labels

Show more