Solved

Error Number Meaning? What is Error 0?

Posted on 2004-08-25
9
161 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
  • 2
  • 2
  • 2
  • +2
9 Comments
 
LVL 85

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 85

Accepted Solution

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

Idle_Mind
0
 
LVL 2

Expert Comment

by:x50Fade
ID: 11899909
Just a thought...this might not be a self raised error that you are catching...?
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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 69

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 69

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now