COM Automation - Get an Alpha series
Posted: Tue Apr 09, 2013 7:56 am
All,
I'm trying to write a short code to put out some data, with dates and titles out of EViews and on to and excel spread sheet. But i seem to hav hit a weird issue with the dates, instead of putting a single date into each cell. Each cell ends will a series of dates, starting with the correct date, and then running to the last observation in the file.
The VBA code is
Scommand = "Alpha ZZ_temp = @STRDATE(" & Chr(34) & " DD/MM/YYYY " & Chr(34) & " ) "
app.Run (Scommand)
Dates = app.Get("ZZ_temp")
rows = UBound(Dates, 1) - LBound(Dates, 1) + 1
WST_TV.Range(WST_TV.Cells(4, 1), WST_TV.Cells(3 + rows, 1)) = Dates
What am i doing wrong? I can look at ZZ_Temp and it looks like what I need, but it doesn't seem to be pulling through to excel correctly.
Is there a better way to pull dates out? It feels like i've missed a trick somewhere.
I'm currently using Eviews V7.2
Kind Regards
Sam
I'm trying to write a short code to put out some data, with dates and titles out of EViews and on to and excel spread sheet. But i seem to hav hit a weird issue with the dates, instead of putting a single date into each cell. Each cell ends will a series of dates, starting with the correct date, and then running to the last observation in the file.
The VBA code is
Scommand = "Alpha ZZ_temp = @STRDATE(" & Chr(34) & " DD/MM/YYYY " & Chr(34) & " ) "
app.Run (Scommand)
Dates = app.Get("ZZ_temp")
rows = UBound(Dates, 1) - LBound(Dates, 1) + 1
WST_TV.Range(WST_TV.Cells(4, 1), WST_TV.Cells(3 + rows, 1)) = Dates
What am i doing wrong? I can look at ZZ_Temp and it looks like what I need, but it doesn't seem to be pulling through to excel correctly.
Is there a better way to pull dates out? It feels like i've missed a trick somewhere.
I'm currently using Eviews V7.2
Kind Regards
Sam