leonvan
asked on
excel system call with spaces in program path
Hi,
I want to add a series of buttons to a spreadsheet that will run a program with different values. The program path has a space in it, so I need to account for that. The argurments may have spaces, but I am trying to eat the elephant one bite at a time. I looked at https://www.experts-exchange.com/questions/21731126/Process-Start-EXCEL-EXE-filepath.html, but I get errors in my implementation. On the DIm p1 statement I get:
compile error user defined type not defined
Help is appreciated.
Leon
I want to add a series of buttons to a spreadsheet that will run a program with different values. The program path has a space in it, so I need to account for that. The argurments may have spaces, but I am trying to eat the elephant one bite at a time. I looked at https://www.experts-exchange.com/questions/21731126/Process-Start-EXCEL-EXE-filepath.html, but I get errors in my implementation. On the DIm p1 statement I get:
compile error user defined type not defined
Help is appreciated.
Leon
Public Sub test_sys_call()
Dim p1 As New Process
p1.StartInfo.Filename = "C:\Program Files\ultravnc\vncviewer.exe" ' required
p1.StartInfo.Arguments = "192.168.1.4" ' required
p1.Start()
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.suodenjoki.dk/us/productions/articles/vbashellexecute.htm
Ignore the fact that they're using PPT, it works in any VBA environment.