Hi,
I'm executing EViews from VBA and I would like to know if there's a command to see the error message that comes from EViews when it's executing something wrong.
I want to initialize add factors. If I run the command _model.addinit(v=n,s=b) @all in a program, it shows a error in the log, but if I execute this command, EViewsApp.Run "_model.addinit(v=n,s=b) @all", in my VBA's sub, I'm unable to know that an error happened and I would like to catch it when it's the case.
Thank you!
ALexis
Error message
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: Error message
Alexis:
Are you catching any VBA errors that are thrown? I believe our Run command throws any EViews errors as an exception that should be caught by your code like this:
Steve
Are you catching any VBA errors that are thrown? I believe our Run command throws any EViews errors as an exception that should be caught by your code like this:
Code: Select all
Public Sub test()
Dim mgr As New EViews.Manager
Dim app As EViews.Application
Set app = mgr.GetApplication(ExistingOrNew)
On Error GoTo ErrorHandler
app.Run "_model.addinit(v=n,s=b) @all"
ExitHandler:
Exit Sub
ErrorHandler:
MsgBox Err.Description
Resume ExitHandler
End Sub
Re: Error message
Hi Steve,
Yes, you're right, but it seems to be the only way that we don't catch the error, that's weird... If a run a model, it shows me when I have an error, but for the initialization of the add factors, we don't catch it unhopefully... So there's no other way to catch the errors that Eviews throws?...
Thank you!
Alexis
Yes, you're right, but it seems to be the only way that we don't catch the error, that's weird... If a run a model, it shows me when I have an error, but for the initialization of the add factors, we don't catch it unhopefully... So there's no other way to catch the errors that Eviews throws?...
Thank you!
Alexis
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Error message
What error does it show when you run it in EViews?
Re: Error message
Division by zero in "ARSCALEGVA equation" in "_MODEL.ADDINIT(V=N,S=B) @ALL".
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Error message
Would it be possible for you to email us the workfile too?
Who is online
Users browsing this forum: No registered users and 2 guests
