Page 1 of 1

VBA EViews Application filename with space

Posted: Wed Feb 12, 2014 7:44 am
by DBel2012
Hi,

I'm currently using EViews 7 and Excel 2010.

I'm running a VBA sub and I'm trying to open an EViews file with the following command :

app.Run "wfopen d:\Test\bd new ipd.wf1"

and I get the following error message :

d:\Test\bd.wf1not found on disk in "wfopen d:\Test\bd new ipd.wf1"

Since the EViews filename has spaces, EViews discards parts of the filename.

Any ideas how to fix that problem without having to remove the spaces in the filename?

Thanks!

Re: VBA EViews Application filename with space

Posted: Wed Feb 12, 2014 9:08 am
by EViews Steve
Try putting the filename in double quotes within your string. Like this:

Code: Select all

app.Run "wfopen ""d:\Test\bd new ipd.wf1"""
Steve

Re: VBA EViews Application filename with space

Posted: Wed Feb 12, 2014 9:15 am
by DBel2012
Steve,

app.Run "wfopen ""d:\Test\bd new ipd.wf1""" does the job.

Many many thanks!

Danny