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

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

djackson
Posts: 6
Joined: Fri Jun 19, 2015 1:33 am

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

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`

EViews Steve
EViews Developer
Posts: 565
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

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

Put quotes around the path inside your string.

Like this:

Code: Select all

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

Steve

djackson
Posts: 6
Joined: Fri Jun 19, 2015 1:33 am

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

Thanks very much, I knew it would be something simple I was missing.