Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Check online network availability

Hi Friends

I want to establish, if the user is on-line with the network
fileserver. Scroll drives or using FileExist method (File Scripting
object) wont do the trick, because the path will often, but not always,
be available offline. I've got to know if they are connected - any
idea's?
Thanks/Mike

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default Check online network availability

Try:

Private Declare Function IsNetworkAlive Lib "SENSAPI.DLL" (ByRef lpdwFlags
As Long) As Long

Sub xx()
Select Case IsNetworkAlive(0)
Case 0
MsgBox "not connected"
Case 1
MsgBox "connected to LAN"
Case 2
MsgBox "connected to WAN"
Case Else
MsgBox "connected to ?other network?"
endselect
End Sub

You probably want to verify whether IsNetWorkAlive returns 0 or nonzero only.

" wrote:

Hi Friends

I want to establish, if the user is on-line with the network
fileserver. Scroll drives or using FileExist method (File Scripting
object) wont do the trick, because the path will often, but not always,
be available offline. I've got to know if they are connected - any
idea's?
Thanks/Mike


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Check online network availability

Very Cool. Thanks. I have no need for it right now, but it should come in
handy at some point in my life...

"AA2e72E" wrote:

Try:

Private Declare Function IsNetworkAlive Lib "SENSAPI.DLL" (ByRef lpdwFlags
As Long) As Long

Sub xx()
Select Case IsNetworkAlive(0)
Case 0
MsgBox "not connected"
Case 1
MsgBox "connected to LAN"
Case 2
MsgBox "connected to WAN"
Case Else
MsgBox "connected to ?other network?"
endselect
End Sub

You probably want to verify whether IsNetWorkAlive returns 0 or nonzero only.

" wrote:

Hi Friends

I want to establish, if the user is on-line with the network
fileserver. Scroll drives or using FileExist method (File Scripting
object) wont do the trick, because the path will often, but not always,
be available offline. I've got to know if they are connected - any
idea's?
Thanks/Mike


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 slow to open - Network/ Online Related Matt Excel Discussion (Misc queries) 0 June 6th 07 12:26 AM
Can the check register be linked to account online? natfish Excel Discussion (Misc queries) 0 October 14th 06 08:57 PM
Check image availability on userform gki Excel Programming 3 July 22nd 04 05:53 PM
Network detects if Windows Username is online Todd Huttenstine Excel Programming 0 July 9th 04 08:12 PM
How to check for availability activeX control Emile van Mierlo Excel Programming 2 May 5th 04 02:32 PM


All times are GMT +1. The time now is 04:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"