Declare Integer InternetCheckConnection in Wininet.dll String Url, Long dwFlags, Long Reserved If InternetCheckConnection(lcURL, 1, 0) = 0 MessageBox("Not connected to the internet.", 16) EndIfIf you're checking for a connection so you can call a web service or some other kind of HTTP functionality, you can pass that specific URL as lcURL.