Results 1 to 4 of 4

Thread: error handle

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    9

    Exclamation

    ok lets say that i have an erron number '-2147467259(80004005)'; and i want to write :

    on Err '-2147467259(80004005)'; GoTo idfixer

    idfixer:
    idfixer:
    MsgBox "îñôø ú.æ äéðå ÷ééí âáø áîòøëú àðà äëðñ çãù"
    txtid = ""
    txtid.SetFocus



    whats wrong here?

    thank you for your help

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    You can't go to an error routine based on specific error numbers. Do something like this instead:

    On Error GoTo ErrorRoutine

    ' your code

    Exit Sub

    ErrorRoutine:

    MsgBox Err.Number & ": " Err.Description

    End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    9
    i know that i can do something just for this err number but how you describe the number

  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    Code:
    On Error GoTo Error_Handler
    
    
    Error_Handler:
    
    Select Case Err.Number
        case -2147467259
            msgbox "Just what I thought!"
        case else
            msgbox err.description
    end select

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width