?
Solved

server status visual basic ??

Posted on 2006-11-24
7
Medium Priority
?
264 Views
Last Modified: 2013-11-25
hey experts!

im looking for a script thats can add a computer and ping the ipaddress to check if its up

webserver1  192.168.5.1  OK(green)
webserver2  192.168.5.2  Down(Red)

does anyone have something writed down ? :)
need answers fast

Thx
0
Comment
Question by:aamodt
[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
  • 4
  • 2
7 Comments
 
LVL 17

Expert Comment

by:Cem Türk
ID: 18009622
what do you mean by "add a computer" ?
adding a to a list of computers to ping?
0
 
LVL 17

Expert Comment

by:Cem Türk
ID: 18009685
0
 
LVL 7

Author Comment

by:aamodt
ID: 18011629
yeah meen to add computers via a button and textbox with ip or hostname in it

hostname 192.168.5.2.1 <- if ping OK show OK in green text or something if dont Down
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 7

Author Comment

by:aamodt
ID: 18011647
i dont need so advance like that cem_turk .. i can just use

        If My.Computer.Network.Ping(txtbox1, 1000) Then ???

right ?  but dont know how to add and store the computer inn the form
0
 
LVL 7

Author Comment

by:aamodt
ID: 18036914
did figure it out :))
0
 
LVL 1

Accepted Solution

by:
ftplds earned 2000 total points
ID: 18280928
Create an access Database with coputer_id ( autonumber)
computer Name (text)
ComputerIP (text)

create an array of two command buttons
create an array of two text boxes
Here is the form load event
Private Sub Form_Load()
With DataEnvironment1
Load DataEnvironment1
Dim c As Integer
c = 8
Dim l As Integer
Dim tr As Integer
If .rsadd.State <> 0 Then .rsadd.Close
.rsadd.Open
tr = .rsadd.RecordCount
Dim h As Integer
h = 200
l = 300
Dim txtintnextindex As Integer
Dim intnextIndex As Integer
Do Until intnextIndex = tr
txtintnextindex = Text1.UBound + 1
intnextIndex = Command1.UBound + 1
Load Text1(txtintnextindex)
Load Command1(intnextIndex)
Command1(intnextIndex).ZOrder 0
Text1(txtintnextindex).ZOrder 0
Command1(intnextIndex).Visible = True
Command1(intnextIndex).Top = h
Command1(intnextIndex).Left = l
Command1(intnextIndex).Caption = .rsadd.Fields("addname")
Text1(txtintnextindex).Text = .rsadd.Fields("ipaddress")
.rsadd.MoveNext
h = h + 700
If .rsadd.AbsolutePosition = c Then
l = l + 1700
h = 200
c = c + 8
End If
Command1(0).Visible = False
Text1(0).Visible = False
Loop
 'Label1.Caption = tr
End With
 Exit Sub
ce:
Form2.Caption = " Now displaying " & Space(1) & tr & " different addresses"
Form2.BackColor = &HC0FFFF

Here is the command1 code
Private Sub Command1_Click(Index As Integer)
Dim ti As Integer
ti = Index
Dim ad As String
ad = Text1(ti).Text
Shell ("Ping " & ad), vbNormalFocus
End Sub
Good luck
0
 
LVL 7

Author Comment

by:aamodt
ID: 18282356
thx good help :)
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

771 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