Desafortunadamente, VB no lo hace fácil, pero afortunadamente la API de Win32 sí lo hace, y es bastante simple llamar a las funciones de Win32 desde VB.
Para la red LAN/WAN, puede utilizar una combinación de las siguientes API Win32 llama para decirle que si existe la conexión remota sin tener que lidiar con una red de tiempo de espera:
Private Declare Function WNetGetConnection Lib "mpr.dll" Alias _
"WNetGetConnectionA" (ByVal lpszLocalName As String, _
ByVal lpszRemoteName As String, ByRef cbRemoteName As Long) As Long
Private Declare Function PathIsNetworkPath Lib "shlwapi.dll" Alias _
"PathIsNetworkPathA" (ByVal pszPath As String) As Long
Private Declare Function PathIsUNC Lib "shlwapi.dll" Alias "PathIsUNCA" _
(ByVal pszPath As String) As Long
Por Internet , puede utilizar la API de Win32 llamada:
sitio
Private Declare Function InternetGetConnectedState Lib "wininet.dll" _
(ByRef lpdwFlags As Long, ByVal dwReserved As Long) As Long
Const INTERNET_CONNECTION_MODEM = 1
Const INTERNET_CONNECTION_LAN = 2
Const INTERNET_CONNECTION_PROXY = 4
Const INTERNET_CONNECTION_MODEM_BUSY = 8
esta VB tiene más discusión sobre path oriented functions you can call in the Win32 API through VB.
objFSO.FileExists ganaron' volverá hasta que empiecen los tiempos muertos que quiere evitar en primer lugar. – Tomalak