Running Excel VBA code vs running Eviews program

For questions regarding programming in the EViews programming language.

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

eviews1
Posts: 18
Joined: Mon May 02, 2016 8:55 am

Running Excel VBA code vs running Eviews program

Postby eviews1 » Mon May 02, 2016 2:46 pm

Hello,

I have a task to run the Johansen cointegration test on sub-samples of a sample data and eventually plotting the trace statistics.

Initially, I tried to write an Excel VBA code that launches EViews and runs the test. Then VBA take the test result to a speadsheet. So Excel VBA was supposed to communicate with EViews via EViews COM Automation (e.g. to run an EViews command from Excel VBA you make a statement app.Run ("group can") which creates a group named "ca")
However, I ran into a problem of programming say a loop using Run method of EViews COM Automation. I was not sure how to put a block of statements using COM Automation.

Another approach to the task could be to write a program in EViews and then ask EViews export selected test results to Excel. I have not started implementing the second approach as I am not sure which method to follow.

Could you give me an advice which method to use: 1) manipulate Eviews from Excle VBA or 2) do everything in EViews code and then export results to Excel

Thank you.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Running Excel VBA code vs running Eviews program

Postby EViews Gareth » Mon May 02, 2016 2:51 pm

Write an EViews program and execute that from VBA

eviews1
Posts: 18
Joined: Mon May 02, 2016 8:55 am

Re: Running Excel VBA code vs running Eviews program

Postby eviews1 » Tue May 03, 2016 7:11 am

Thank you. Just made a small prg and tested to run it from Excel VBA.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests