Solved

Checking the online status of a computer on a network

Posted on 1998-11-20
1
121 Views
Last Modified: 2010-05-03
Is there a way to use VB to tell whether or not a computer is on the network?? any code will be helpful. Will start at 50 will give more for a more thorough answer.  thanks!
0
Comment
Question by:gwaltersii
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
jf26028 earned 50 total points
ID: 1445983
You can use ping to tell if the computer is on the network.  It is not exactly vbcode, but it works.  Just do the following:

dim tempstring as string
dim computername as string   'has the name of the computer you
                             'to identify on the network

open "temp.bat" for output as #1
print #1, "ping " & computername & " > temp.tmp"
close #1
shell("command.com /c temp.bat", vbhidden)
open "temp.tmp" for input as #1
line input #1, tempstring
line input #1, tempstring
line input #1, tempstring
close #1

if instr(tempstring, "Request timed out.") then
   msgbox "computer not found",,"error"
else
   msgbox "computer found",,"found"
end if



this is rough code, you can parse the file different ways and clean up this code, but it should work.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question