Solved

Error Number Meaning? What is Error 0?

Posted on 2004-08-25
9
167 Views
Last Modified: 2010-05-02
I have put some error handling into my app.  The bad news is that I can't get in anymore.  I get the error message from my error handler Error number 0, Error message: A critical error has occured.

What is going on?  Is there a place I can find out what the error numbers mean?  Something more specific.
0
Comment
Question by:mlcktmguy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
9 Comments
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 11899554
If you post some of your code that has the error handling in it, perhaps we can spot the problem.

Idle_Mind
0
 
LVL 1

Author Comment

by:mlcktmguy
ID: 11899576
I appreciate the offer but I was able to locate the error in the code.

I am interested in finding a somewhere that lists the error numbers and the reasons behind them?  I have a book that listed the file handling errors and the reason they would be generated.  I built this into the error handling routine but don't know where to find a description to relate to the other error numbers.
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 60 total points
ID: 11899589
They are all in the help file under "Trappable Errors".

Idle_Mind
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:x50Fade
ID: 11899909
Just a thought...this might not be a self raised error that you are catching...?
0
 
LVL 18

Assisted Solution

by:JR2003
JR2003 earned 65 total points
ID: 11901286
Error 0 means you have NO error.
Have a look at your code.
Is it possible you are going into your error catch routine when there is no error???

You should have something like this in each function. The GoTo SkipTrap skips the error trapping if there is no error.:

Private Function GeneralFunction()

   On Error Goto Trap

'Code main body of function here:
'
'
'
'
'
    GoTo SkipTrap
   
Trap:
   
    Screen.MousePointer = vbDefault
   
    Dim iResult As VbMsgBoxResult
    With Err
        iResult = MsgBox("Error: " & .Number & vbNewLine & _
                "Description: " & .Description & vbNewLine & _
                "Source: " & .Source, vbAbortRetryIgnore Or vbExclamation, "Error")
        If iResult = vbRetry Then
            Resume
        ElseIf iResult = vbIgnore Then
            Resume Next
        End If
    End With

SkipTrap:

End Function
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 11901774
One thing is missing from JR2003 code and probably from your code too.

Just before the Trap: label, you need to exit the function or method:

    Exit Function
Trap:
0
 
LVL 18

Expert Comment

by:JR2003
ID: 11903049
emoreau,
It is NOT missing from my code.
There is a line saying "GoTo SkipTrap" just before the "Trap:" label!
JR
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 11903483
You are right JR2003. I didn't saw that.
0
 
LVL 1

Author Comment

by:mlcktmguy
ID: 11903717
Since thisis really a two part question I am going to split the points between Idle Mind and JR2003.  
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question