Solved

server status visual basic ??

Posted on 2006-11-24
7
256 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
  • 4
  • 2
7 Comments
 
LVL 17

Expert Comment

by:cem_turk
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_turk
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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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 500 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Best book to learn C++ 4 79
Microsoft Access combo box help 2 46
Modifying Conditional Format from VBA code 3 55
MS Access 03, TransferText, decimal places 8 69
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

770 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