Page 1 of 1

### Calling EViews from excel with spaces in the path name

Posted: Thu Jul 11, 2019 4:46 am
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.ManagerDim app As EViews.ApplicationDim program_to_call As Stringprog_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
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
Thanks very much, I knew it would be something simple I was missing.