How to do "ping" from VBA ?

  • 14 years ago
    I have a VBA project which downloads some files from a remote server using FTP and then goes on to do other things. If the remote server is offline, the time delay while the connection attempt times out is annoying, and I would like to use something like the "ping" DOS command to determine if the server is available before trying to connect.
    However, I don't know how to do this, and how to return a variable from the "ping" which VBA can use in an "IF.. " statement.
    Any suggestions greatfully received.



Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” - Rick Osborne