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
COM Automation - Get an Alpha series
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: COM Automation - Get an Alpha series
Unfortunately our resident COM expert, Steve, is on vacation this week. Might take a while to get an answer :(
Re: COM Automation - Get an Alpha series
OK, No worries.
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: COM Automation - Get an Alpha series
In the last line of your VBA code, make it say:
WST_TV.Range(WST_TV.Cells(4, 1), WST_TV.Cells(3 + rows, 1)).Value = Dates
Steve
WST_TV.Range(WST_TV.Cells(4, 1), WST_TV.Cells(3 + rows, 1)).Value = Dates
Steve
Re: COM Automation - Get an Alpha series
Sorry, but i still get the same issue.
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: COM Automation - Get an Alpha series
Ok, I was able to confirm this is a bug. I'll let you know when we have a fix for this...
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: COM Automation - Get an Alpha series
This bug has been fixed and will be in the next patch. Not sure when the patch is being released but it should be soon.
Steve
Steve
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: COM Automation - Get an Alpha series
Ok, patch for this bug has been built and released. Look for Build Date of: April 16, 2013.
Steve
Steve
Who is online
Users browsing this forum: No registered users and 2 guests
