Adding a Dos command in EXCEL

G

Guest

Hi all

I dont know if this can easily be done But i hope it can and someone can
assist me.
I wish to add a command in a Excel spreadsheet
*ping* - Im sure you guys know the command Basically a Dos command the sends
packets and gets a responce from a system.

How i would like to do this is as follows.
I have a Rather Large database of systems and thier IP addresses Each has a
ID assigned
On a setion of this document i have a Collection of Vlookup and other
commands such as =(CONCATENATE(MID(C7,1,((LEN(C7))-2)),"6"))
ETC... What i would like to have is a Link that i simply need to click that
will ping the IP that is brought up for a Specific code that i enter. Lets
assume first which im sure will make things alot more simple what i want to
add is a command that executes a Ping with a IP that is located in a cell...

So something like *Ping commandline parameters* (C7) *(C7) being the
location of the IP address.

I hope you guys can assist me in this and im sure i'll want to kick my own
ass when i see how its done....

Thanks alot for the assistance.
 
G

Guest

Thanks for that But now another Question. is there a Easier way. i kind dont
have a Programing knowladge that is helpful at this point. sorry.
 
G

Guest

Not that I amd aware of
--
Gary's Student


Gareth - Network analyst. said:
Thanks for that But now another Question. is there a Easier way. i kind dont
have a Programing knowladge that is helpful at this point. sorry.
 
G

Guest

Dont suppose i would be lucky enough to have someone that Got loads of time
to blow and feel like typing out a Coding that i can just copy and past then
into Excel 2003 VB plugin that just needs me to click the link and all it
does is start a ping with a IP that is desplayed in cell C7 just needs to
display the ping, no report printouts, or saving the info anywhere nothing
just execute Ping with IP in cell C7 and display the normal Dos box with the
results.....
 
G

Guest

Hi Gareth:

If you can put your ping commands into a batch (.bat) file, we can show you
how to drive the commands from Excel and capture the information.
 
G

Guest

Sorry if i seem a lil dence here... but Ok here exactly is what i wat to do.

I have a listing of 800 individual Networks. on a seperate sheet i have a
lookup that finds the site number and brings up in seperate cells, Site name
and 3 individual Ip addresses.

If a site goes down one of these 3 devices are the cause so what i want to
do is have a cell or button for each IP address where i can click on it and
it will ping the IP that my Vlookup has brought up....

My cells if it helps at all look like this...

Site Code: 1200
Server Name: MARKET_STR =VLOOKUP(C2,Listing!A:D,2,FALSE)
Speed Dial: *5045 =VLOOKUP(C2,Listing!A:D,3,FALSE)
Tel No: ********* =VLOOKUP(C2,Listing!A:D,4,FALSE)
GateWay For Store: Market_STR_GATE =VLOOKUP(C2,Listing!A:E,5,FALSE)
Server IP: 10.32.187.10 =VLOOKUP(C2,Listing!A:F,6,FALSE)
2ND Server IP: 10.32.187.6
=(CONCATENATE(MID(C7,1,((LEN(C7))-2)),"6"))
Router IP: 10.32.187.1
=(CONCATENATE(MID(C7,1,((LEN(C7))-2)),"1"))
 
G

Guest

ok i got this so far... took me a while to look it all up.... can i get how
to get it so my string (ServerIP) gets the Value from cell C7

Private Sub PingME()

Dim RetVal, ServerIP As String

ServerIP = "127.0.0.1"

RetVal = Shell("C:\WINDOWS\SYSTEM32\PING.EXE " & ServerIP, 1)

End Sub
 
G

Guest

BWAHAHAHAHAHA I figured it out... :)

Private Sub Pingserver_click()

Dim RetVal, ServerIP As String

ServerIP = Range("C7")

RetVal = Shell("C:\WINDOWS\SYSTEM32\PING.EXE " & ServerIP, 1)

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top