We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

Run a window cmd ping from a macro [closed]

asked 2014-12-21 10:49:06 +0200

jobzombi gravatar image

updated 2017-12-10 16:37:04 +0200

erAck gravatar image

I know we have the Shell the command:

Shell (Pathname As String[, Windowstyle As Integer][, Param As String][, bSync])

But I don't want to use a .bat file, but just do a ping. In excel I could do:

command = "ping"
Shell(command, vbNormalFocus)

But I cannot seem to get it to work in libreoffice. I've review the openoffice sites, here and some documentations on basic, but I cannot seem to find out how. I keep getting syntax errors.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-03-07 02:58:30.728265


The help site has some examples, but they are exe or bat files.

jobzombi gravatar imagejobzombi ( 2014-12-23 04:03:56 +0200 )edit

This helped though. Thanks.

jobzombi gravatar imagejobzombi ( 2014-12-23 04:04:08 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2014-12-22 16:13:59 +0200

JohnSUN gravatar image

updated 2014-12-23 09:52:35 +0200

Should work so Shell("cmd", 1, "/K ping", False)

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-12-21 10:49:06 +0200

Seen: 2,014 times

Last updated: Dec 23 '14