COM automation bug?

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

dravenous
Posts: 33
Joined: Thu Jan 29, 2015 2:30 pm

COM automation bug?

Postby dravenous » Thu Apr 06, 2017 6:20 pm

Hey guys,

So I'm using Eviews 9.5 and I've had a VBA macro that has worked for the last 2 years. Suddenly I attempted to run the macro yesterday and I was no longer able to. The macro just breaks and says some mumbo jumbo like "Automation Error -2147417848 The object invoked has disconnected from its clients." The only thing that I've noticed is, normally if you have Eviews open and run the VBA macro Eviews will generate the workfile and do all of the data imports/actions so I can see it as it goes through. It appears VBA is having trouble creating the workfile within Eviews. Even something as simple as the code below no longer creates the workfile like I've come to expect. Was there a change made? I'm using Excel 2010, btw.

Code: Select all

Sub Test()
Dim mgr As New EViews.Manager
Dim app As EViews.Application
Set app = mgr.GetApplication(ExistingOrNew)

app.Run "wfcreate(wf=C:\test\temp1) a 1975 2046"

End Sub

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

Re: COM automation bug?

Postby EViews Steve » Fri Apr 07, 2017 7:38 am

WFCREATE actually creates the workfile in memory, but it doesn't actually save it to the specified file.

If you're seeing your VBA macro cause EViews to crash, but you're seeing different behavior when EViews is already open, make sure the VBA macro is using the same version of EViews (e.g. if you have both 32-bit and 64-bit EViews installed). To verify, make a small change to your VBA macro to show the application window (call Show()), and then once the program is open, go to the Help/About EViews menu item to verify the version and build date of instance of EViews that was opened by your VBA macro.

If the version is what you expect, and your build date is the latest version of EViews 9 (Apr 3, 2017), then please send me a portion of your program (and related data files) that is causing the crash so I can replicate it.

dravenous
Posts: 33
Joined: Thu Jan 29, 2015 2:30 pm

Re: COM automation bug?

Postby dravenous » Fri Apr 07, 2017 11:16 am

Hey Steve,

Thanks for the info. I knew that Eviews doesn't actually save the file, it just used to pop up the wf automatically if I had Eviews open. It came back like I expected when I forced it to show per your advice. I still experienced the same error though. The weird thing is I ran it on a computer with Excel 2013 and the macro still worked like it always has. I've run it on a few people's computers with Excel 2010 and boom crashes. If you don't have 2010 it might be hard to replicate, do you?

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

Re: COM automation bug?

Postby EViews Steve » Fri Apr 07, 2017 11:22 am

No I don't have Office 2010. It would be really strange if the bug was due to something that changed in Excel 2010, but it sounds like that might be the issue. Did it get updated recently on your machines? I would try open the macro in edit mode (in Office 2010) and removing, then re-adding the EViews Type Library reference, and then saving the macro again to see if that resolves your issue.

What build date is the copy of EViews that you're using?

dravenous
Posts: 33
Joined: Thu Jan 29, 2015 2:30 pm

Re: COM automation bug?

Postby dravenous » Fri Apr 07, 2017 12:02 pm

To my knowledge Excel wasn't updated, but that doesn't mean it didn't happen behind the scenes. I am using the April 3 2017 build of Eviews. I removed the type library reference, saved, manually re-added, same crash. It's quite bizarre.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 16 guests