Macro stops after import
Posted: Tue Feb 04, 2014 4:47 am
Hi, I am using the com add-in to run some seasonal adjusting from Excel through Eviews. I am using following VBA code:
After the code performs the import line the macro stops withou a notice. Originally I had a program with import lines which called, but that ended in the same way.
Thanks for help.
Code: Select all
Sub SeaAdj()
Dim mgr As New EViews.Manager
Dim App As EViews.Application
Dim sheet_update As Worksheet
Dim asheet As Worksheet
Set asheet = ActiveSheet
Set App = mgr.GetApplication(ExistingOrNew)
Dim datum As String
datum = InputBox("Fill the data of the last known figure in Eviews format (e. g. 1998q1).", "Date")
lspath = "Z:"
App.Run "cd " & lspath
App.Run "wfopen qpm_sk"
App.Run "import(resize) Z:\922\923new\VYSTUPY\Slovakia\quarterly\Model\history_sk.xls range='Data'"
App.Run "smpl 1998q1 " & datum
App.Run "run seasonal_adjustment"
......Thanks for help.