I am using EViews COM automation in order to invoke EViews from a VB script. I do the following:
set mgr = CreateObject("Eviews.Manager")
set app = mgr.GetApplication(1)
But I am getting the following error:
"Eviews.Manager.1: GetApplication could not create instance of Eviews Application Object"
I am on Windows XP and using EViews 7.0
What am I doing wrong here? Any pointers will be greatly appreciated.
EViews COM Automation and VBScript
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: EViews COM Automation and VBScript
Hi Alice:
There are several things to check.
First, a quick sanity check. Make sure you can run EViews itself (on the same machine) without any problems.
Second, once EViews is running, type the following command into the EViews command window: REGCOMPONENTS. In the next dialog, verify that "COM Automation" is registered. Click "Yes" to register or re-register everything again. Verify that it completes successfully.
Try your VB script again.
If it still doesn't work, perhaps you're running into a 64-bit problem. Is your machine running a 64-bit OS? If so, you'll have to make sure your VB Script is running under the 32-bit script engine. Our objects are 32-bit and must be run in a 32-bit environment. On a 64-bit machine, the 32-bit script engine is found specifically at: c:\Windows\SysWow64\cscript.exe. So run your script like this:
c:\Windows\SysWow64\cscript.exe myscript.vbs
Steve
There are several things to check.
First, a quick sanity check. Make sure you can run EViews itself (on the same machine) without any problems.
Second, once EViews is running, type the following command into the EViews command window: REGCOMPONENTS. In the next dialog, verify that "COM Automation" is registered. Click "Yes" to register or re-register everything again. Verify that it completes successfully.
Try your VB script again.
If it still doesn't work, perhaps you're running into a 64-bit problem. Is your machine running a 64-bit OS? If so, you'll have to make sure your VB Script is running under the 32-bit script engine. Our objects are 32-bit and must be run in a 32-bit environment. On a 64-bit machine, the 32-bit script engine is found specifically at: c:\Windows\SysWow64\cscript.exe. So run your script like this:
c:\Windows\SysWow64\cscript.exe myscript.vbs
Steve
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: EViews COM Automation and VBScript
Another sanity check -- install the latest patch for EViews 7.
Who is online
Users browsing this forum: No registered users and 2 guests
