Results 1 to 4 of 4

Thread: Error Checking

  1. #1

    Thread Starter
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Here's my problem, I have a .tif file displaying into a tiff viewer. My tiff is being displayed based on a text box, which holds the path to the image. If the image path, for example says, "c:\images\2365.tif" and there isn't a tiff, I get an error "53". How can I error check for this?? Would i do someting like: Any better ideas??

    On Error GoTo HandleErrors:

    CODE.....

    HandleErrors:
    If err.number = 53 then
    MsgBox"Error, Image doesn't exist"
    End if

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    You might want to tell it what to do instead
    or posting a message or post a message and
    go on.

    Resume Next
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Lively Member
    Join Date
    Oct 2000
    Location
    Scotland
    Posts
    96
    HandleError:

    select case err.number

    case 53:
    Msgbox "This file does not exist. Please try again!", vbOkOnly
    txtfilename.seltext
    'I think.... Highlights the text in your textbox
    Resume Start
    ' Place start : at start of this routine

    Else :
    msgbox " Standard error messgage"
    or
    global error handler

    Easier to modify for any other err.numbers that you want to handle.

    H.
    Just trying to muddle through...

  4. #4

    Thread Starter
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496

    thank you

    thank you for the help!

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