Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: test for 'online' (Word97SR2 or any VBA)

    With some help from the API :

    Private Declare Function InternetGetConnectedState _
    Lib "wininet.dll" _
    (ByRef lpSFlags As Long, _
    ByVal dwReserved As Long) As Long

    Private Function bOnline() As Boolean
    bOnline = InternetGetConnectedState(0&, 0&)
    End Function


    Andrew C

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    test for 'online' (Word97SR2 or any VBA)

    The excellent response http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number= 215766 by John Hutchison leads me to wonder why I find no obvious suggestions in the various VBA help fiels to test if an internet connection is available.


    "retval = Shell("C:Program FilesNetscapeCommunicatorProgramnetscape.exe " & strdestination)" will launch Netscape (Mozilla, IE etc) but then the system hangs for about ten seconds while the browser makes SURE that there is no internet connection.


    Does anyone have a code fragment that provides the equivalent of

    <pre>If blnDialedUp Then
    .....
    </pre>


  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: test for 'online' (Word97SR2 or any VBA)

    Andrew, thanks. This is perfect!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •