×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Catching errors
2

Catching errors

Catching errors

(OP)
Hi! I need help!

How to catch an error in Visual Basic for Word2000? Is there any constructions like Try...Catch...Finally?

P.S. I need to find out whether the file exist.

RE: Catching errors

Hi TyP,

A couple of options, under the Tools->Options pull-down, under the General tab, in the section marked Error Trapping, you can set it to Break on All Errors, or you can create your own error trapping with an:

CODE

On Error GoTo errHandler

...
..

errHandler:
..
.

HTH
Todd

RE: Catching errors

Don't forget to put an Exit Sub above the errHandler: or you'll run the errHandler every time at the end of your procedure.

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

RE: Catching errors

(OP)
2 TCARPENTER1 & joerd:
Thank you so much! I have done it! And it works (:

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources