Ask Your Question
0

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 192.168.1.1"
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

Comments

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
0

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 192.168.1.1", False)

edit flag offensive delete link more

Question Tools

1 follower

Stats

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

Seen: 838 times

Last updated: Dec 23 '14