Excel-VBA and EViews9 ActiveX error message

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

DBel2012
Posts: 69
Joined: Sun Sep 30, 2012 5:37 am

Excel-VBA and EViews9 ActiveX error message

Postby DBel2012 » Thu Jan 21, 2016 7:29 am

Good morning,

I use EViews9 and Office 2010 32-bit

I've got an Excel-VBA program that calls EView that used to work well under EViews8 but not anymore under EViews9. I've got and error message that says something like «An activeX component can not create object».

What can possibly be the cause of that problem?

Thanks!

Danny

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

Re: Excel-VBA and EViews9 ActiveX error message

Postby EViews Steve » Thu Jan 21, 2016 8:42 am

Try re-registering EViews COM components by typing in the command "REGCOMPONENTS" into EViews 9. You'll see a dialog appear, click the "Yes (All)" button to re-register everything. You'll need to be a local admin in order to do this successfully.

Also, if your Excel is 32-bit, I would suggest you install 32-bit EViews 9 instead of (or in addition to) 64-bit EViews 9.

Steve

DBel2012
Posts: 69
Joined: Sun Sep 30, 2012 5:37 am

Re: Excel-VBA and EViews9 ActiveX error message

Postby DBel2012 » Fri Jan 22, 2016 9:07 am

Hi Steve,

We do not have the 32-bit version of EViews 9, my company only bought the 64-bit version. We decided to installed the 64-bit version of Office in place of the 32-bit version.

I ran my VBA-Excel program, but still got the same message «An activeX component can not create object»

Any other idea to fix that problem?

Thanks!

Danny

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

Re: Excel-VBA and EViews9 ActiveX error message

Postby EViews Steve » Fri Jan 22, 2016 9:13 am

When you purchase EViews 9, it comes as both 32-bit and 64-bit. You are allowed to install both on the same machine using a single license. If you want both, contact our sales department with your serial number and we can send you the download links again.

If I understand you correctly, you uninstalled Office 32-bit and installed Office 64-bit instead? Did you run the REGCOMPONENTS command?

What does your VBA code that creates the EViews Manager and Application object look like? Which EViews type library did you reference in your VBA project? (Did you use EViews 9.0 Type Library?)

Steve

DBel2012
Posts: 69
Joined: Sun Sep 30, 2012 5:37 am

Re: Excel-VBA and EViews9 ActiveX error message

Postby DBel2012 » Fri Jan 22, 2016 9:49 am

Hi Steve,

Problem solved.

In order to solve the problem, I had to :
unselect EViews 1.0 Type Library
in order for the
EViews 9.0 Type Library to be installed.

Thanks for your help.

Danny

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

Re: Excel-VBA and EViews9 ActiveX error message

Postby EViews Steve » Fri Jan 22, 2016 11:56 am

Great!

As a side note, if you are writing VBA code to run on machines that may or may not have the latest version of EViews (maybe some of your users have EViews 8, others EViews 9), our COM whitepaper has a section named "Choosing an EViews Version" (on page 9) that tries to address this issue. The section immediately after that (named "Using the Latest Version of EViews") shows how to write code that will work regardless of which version of EViews is installed.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests