VBA EViews Application filename with space

For questions regarding programming in the EViews programming language.

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

DBel2012
Posts: 69
Joined: Sun Sep 30, 2012 5:37 am

VBA EViews Application filename with space

Postby DBel2012 » Wed Feb 12, 2014 7:44 am

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!

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

Re: VBA EViews Application filename with space

Postby EViews Steve » Wed Feb 12, 2014 9:08 am

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

DBel2012
Posts: 69
Joined: Sun Sep 30, 2012 5:37 am

Re: VBA EViews Application filename with space

Postby DBel2012 » Wed Feb 12, 2014 9:15 am

Steve,

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

Many many thanks!

Danny


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests