Solved

server status visual basic ??

Posted on 2006-11-24
7
252 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
Comment Utility
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
Comment Utility
0
 
LVL 7

Author Comment

by:aamodt
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 7

Author Comment

by:aamodt
Comment Utility
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
Comment Utility
did figure it out :))
0
 
LVL 1

Accepted Solution

by:
ftplds earned 500 total points
Comment Utility
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
Comment Utility
thx good help :)
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now