De: Stratos Malasiotis À: Frank Schrauwen Objet: Re: Internet connection Date : vendredi 15 septembre 2000 15:08 Hi Frank, Try: ------------------- Option Explicit Private Declare Function InternetGetConnectedState _ Lib "wininet.dll" _ ( _ ByRef lpdwFlags As Long, _ ByVal dwReserved As Long _ ) _ As Boolean 'wininet.h header file: 'INTERNETAPI 'BOOL 'WINAPI 'InternetGetConnectedState( ' OUT LPDWORD lpdwFlags, ' IN DWORD dwReserved); '// Flags for InternetGetConnectedState '#define INTERNET_CONNECTION_MODEM 1 '#define INTERNET_CONNECTION_LAN 2 '#define INTERNET_CONNECTION_PROXY 4 '#define INTERNET_CONNECTION_MODEM_BUSY 8 Sub test() Debug.Print InternetGetConnectedState(0, 0) End Sub ---------------------------------------- Haven't tested to any offline system but I guess it should work (hopefully). HTH Stratos De: Stratos Malasiotis À: Frank Schrauwen Objet: Re: Internet connection Date : vendredi 15 septembre 2000 22:34 Hi Frank, Try Michka's way : http://www.trigeminal.com/code/Connect.bas Frank Schrauwen wrote: > > dear group members > > Is there a way in vba to check if a computer is online or not? > My workbook collects data from the internet using a query , but first I want > to check if the used system is online.... > tia > Frank