Page 1 of 1

Calling EViews from excel with spaces in the path name

Posted: Thu Jul 11, 2019 4:46 am
by djackson
I'm trying to run an eviews program from Excel, but if there are spaces in the path name then it truncates the path at the first space. How do I get around this? Code I'm using is below.

Code: Select all

Dim mgr As New EViews.Manager
Dim app As EViews.Application
Dim program_to_call As String

prog_path = "C:\EV_Auto_test\Space test\interpolate_q"

Set app = mgr.GetApplication(ExistingOrNew)
app.Run "run " & prog_path

Re: Calling EViews from excel with spaces in the path name

Posted: Thu Jul 11, 2019 7:08 am
by EViews Steve
Put quotes around the path inside your string.

Like this:

Code: Select all

app.Run "run """ & prog_path & """"


Steve

Re: Calling EViews from excel with spaces in the path name

Posted: Fri Jul 12, 2019 8:56 am
by djackson
Thanks very much, I knew it would be something simple I was missing.