Results 1 to 5 of 5
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    error handler code not (WordXP SP3)

    HIya

    We have a standard install of OfficeXP. When we run code that has errors> the code is to go into the error handler code. However on some of the pcs the code does not step into the errorhandler. It just stops on the line where the error occurs. Have you seen this behaviour before? Any idea how we can fix it?

    many thanks Diana

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: error handler code not (WordXP SP3)

    This can happen if the error handler has not exited properly the first time, using a Resume statement. When the second error occurs, VB halts. See my old post <!post=#292116,292116>#292116<!/post> for further comment on this issue.

    Added: I guess I'm a broken record. Here's <!post=a better post,227398>a better post<!/post> on this.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: error handler code not (WordXP SP3)

    hey jefferson - thanks for that.
    I'll give that ago... i initially thought it was a pc environment setting, eg office xp install or some sort of file, as its happening the error handler code is working in one office...but not working in another office.
    diana

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: error handler code not (WordXP SP3)

    I think there are a few kinds of errors that VBA doesn't handle at all even if you tell it to, so if you could post the details, that might help, too.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: error handler code not (WordXP SP3)

    Something else to check is the Error Trapping setting in the General tab of Tools | Options... (in the Visual Basic Editor). This is a user-level setting. The default is "Break on Unhandled Errors", meaning that code won't halt if an error occurs in a prodedure with an On Error handler. If the user has set it to "Break on All Errors", the code will halt on the line where an error occurs even if there is an On Error handler.

Posting Permissions

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