Announcement

Collapse
No announcement yet.

Ping IP In Cell With VBA

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ping IP In Cell With VBA

    Hi!
    I have a button in excel and I have two cells.
    -in cell A1 i have a name of computer or an IP.
    -in cell B1 i would like to make the result.

    If i have a click in the button, i would like to make a "ping -t host_name" and put the result "on line" or "off line" in the cell B1.

    Is it possible??
    very thank's!

  • #2
    Re: Ping With Vba

    Take a look at the possible answers above.

    Regards,
    Ger

    Check out our new reputation system. Click on the "star" under the post!
    _______________________________________________

    There are 10 types of people in the world. Those that understand Binary and those that dont.

    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25...

    The BEST Lookup function of all time

    Dynamic Named Ranges are your bestest friend

    _______________________________________________

    Comment


    • #3
      Re: Ping With Vba

      Not sure why you would want to use the -t switch. It will require user action to end that ping.

      At a DOS prompt type:
      Ping ozgrid.com > c:\ozgrid.txt

      And view the results. You can use Shell to execute the command and then text reading methods to read the txt file. You need an example for each scenario. In other words, what line in the text file shows a connection and which does not and which shows invalid address to ping.

      Comment


      • #4
        Re: Ping IP In Cell With VBA

        See also http://www.ozgrid.com/forum/showthread.php?t=80630
        Entia non sunt multiplicanda sine necessitate.

        Comment


        • #5
          Re: Ping IP In Cell With VBA

          oh! it's very important.. If the computer disconnected the B1 puts to Off line and if it's reconnected puts On line.

          Comment


          • #6
            Re: Ping IP In Cell With VBA

            What is MORE important is that you at least acknowledge those that are TRYING to help you as apposed to totally ignoring them!

            Comment


            • #7
              Re: Ping IP In Cell With VBA

              I write in CMD "Ping -t hostname > c:\ping.txt"
              this ping is continuos and it's very real for me.
              Is it possible that use a macro to learn this file (ping.txt) and delete the file when I click at my button "stop_" ?

              Comment


              • #8
                Re: Ping IP In Cell With VBA

                You can test the ping test here http://www.ip-details.com/ and also get the ip address,ip search,domain host search,get ip details....

                Comment


                • #9
                  Re: Ping IP In Cell With VBA

                  Hi Sushmaa - welcome to the forum - there is no need to re-open threads which are 3 years old.

                  Best Regards,
                  Ger

                  Check out our new reputation system. Click on the "star" under the post!
                  _______________________________________________

                  There are 10 types of people in the world. Those that understand Binary and those that dont.

                  Why are Halloween and Christmas the same? Because Oct 31 = Dec 25...

                  The BEST Lookup function of all time

                  Dynamic Named Ranges are your bestest friend

                  _______________________________________________

                  Comment

                  Working...
                  X