EViews - Excel VBA integration

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

PMaier
Posts: 36
Joined: Sat Sep 11, 2010 10:12 am

EViews - Excel VBA integration

Postby PMaier » Tue Oct 30, 2012 1:26 pm

Good afternoon,

Strictly speaking, the following may not be a bug, but is something that definitively should be filed under "odd behavior". I'm mentioning this because it might others save some time researching this issue.

Here's the situation: I'm calling EViews from an Excel spreadsheet. Following the COM Automation Whitepaper, I've checked the "EViews 1.0 Type library" in the MS VB editor (Tools - References). Now, when I use the "right" or "left" function in the VBA code to retrieve a subset of a string, I get the following error message in Excel:

"Can't Find Project or Library"

After disabling the "EViews 1.0 Type library", the VBA code runs smoothly.

I wasn't able to come up with a suitable workaround yet; all I could think of is loading or unloading the EViews library dynamically. I'm still trying to figure out how to do this; in the interim, any alternative solutions or workarounds would be welcome!

Philipp

EViews Steve
EViews Developer
Posts: 844
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: EViews - Excel VBA integration

Postby EViews Steve » Tue Oct 30, 2012 1:34 pm

Strange -- I tried to recreate the issue but wasn't able to -- the Right and Left functions always worked for me.

Just so you know, the Right and Left functions are part of the VBA library so you can call them like this:

Code: Select all

Dim cs As String cs = "hello" Dim cs2 As String cs2 = VBA.Right(cs, 2) MsgBox cs2
Steve


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 2 guests