Solved

Error Number Meaning? What is Error 0?

Posted on 2004-08-25
9
165 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 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
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

761 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