COM Automation Snag
Posted: Mon Mar 12, 2012 1:39 pm
Hello,
I'm using Eviews 7.2 to try to write some VBA code to write a certain range of Excel Cells into an Eviews workfile.
Here's where I'm at so far:
Sub eviews()
Dim mgr As New EViews.Manager
Dim app As EViews.Application
Set app = mgr.GetApplication(EViews.CreateType.ExistingOrNew)
app.Show
app.ShowLog
app.Run "wfopen K:\non-data-path-folder\workfile.wf1"
app.Run "run K:\non-data-path-folder\Programs\program.prg"
End Sub
The wfopen command seems to be defaulting to the data path and I can't figure how to either temporarily change the data path or allow the command to look for the workfile in a different place.
If I "comment out" the wfopen line, I still cannot get the program to run. Eviews seems almost unresponsive to my attempt. I do not know where I'm misunderstanding the app.run (CommandString) concept.
Thanks for any help or tips.
I'm using Eviews 7.2 to try to write some VBA code to write a certain range of Excel Cells into an Eviews workfile.
Here's where I'm at so far:
Sub eviews()
Dim mgr As New EViews.Manager
Dim app As EViews.Application
Set app = mgr.GetApplication(EViews.CreateType.ExistingOrNew)
app.Show
app.ShowLog
app.Run "wfopen K:\non-data-path-folder\workfile.wf1"
app.Run "run K:\non-data-path-folder\Programs\program.prg"
End Sub
The wfopen command seems to be defaulting to the data path and I can't figure how to either temporarily change the data path or allow the command to look for the workfile in a different place.
If I "comment out" the wfopen line, I still cannot get the program to run. Eviews seems almost unresponsive to my attempt. I do not know where I'm misunderstanding the app.run (CommandString) concept.
Thanks for any help or tips.