Running Excel VBA code vs running Eviews program
Posted: 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.
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.