+ Reply to Thread
Results 1 to 9 of 9

Excel 2003 On Error Resume Next doesn't work for me

  1. #1
    Leadee
    Guest

    Excel 2003 On Error Resume Next doesn't work for me

    I just migrated all of my apps from Excel 2000 to Excel 2003. Now the VBA
    code fails whereever I had an On Error Resume Next statement. It's as if that
    statement is being ignored. My current error is a MAPI_E_NOT_FOUND error,
    which is triggering a run time error even though I have an on error resume
    next line above it. Any ideas as to how to trap this error in Excel 2003?

  2. #2
    Tom Ogilvy
    Guest

    Re: Excel 2003 On Error Resume Next doesn't work for me

    On Error Resume Next only works with Trappable errors. I suspect, that if
    it isn't working, then you are getting an error that is not trappable.

    --
    Regards,
    Tom Ogilvy


    "Leadee" <[email protected]> wrote in message
    news:[email protected]...
    > I just migrated all of my apps from Excel 2000 to Excel 2003. Now the VBA
    > code fails whereever I had an On Error Resume Next statement. It's as if

    that
    > statement is being ignored. My current error is a MAPI_E_NOT_FOUND error,
    > which is triggering a run time error even though I have an on error resume
    > next line above it. Any ideas as to how to trap this error in Excel 2003?




  3. #3
    Leadee
    Guest

    Re: Excel 2003 On Error Resume Next doesn't work for me

    Thank you for the info. So what is the solution to work with non-trapple
    errors?

    "Tom Ogilvy" wrote:

    > On Error Resume Next only works with Trappable errors. I suspect, that if
    > it isn't working, then you are getting an error that is not trappable.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "Leadee" <[email protected]> wrote in message
    > news:[email protected]...
    > > I just migrated all of my apps from Excel 2000 to Excel 2003. Now the VBA
    > > code fails whereever I had an On Error Resume Next statement. It's as if

    > that
    > > statement is being ignored. My current error is a MAPI_E_NOT_FOUND error,
    > > which is triggering a run time error even though I have an on error resume
    > > next line above it. Any ideas as to how to trap this error in Excel 2003?

    >
    >
    >


  4. #4
    Tom Ogilvy
    Guest

    Re: Excel 2003 On Error Resume Next doesn't work for me

    Avoid the error.

    --
    Regards,
    Tom Ogilvy

    "Leadee" <[email protected]> wrote in message
    news:[email protected]...
    > Thank you for the info. So what is the solution to work with non-trapple
    > errors?
    >
    > "Tom Ogilvy" wrote:
    >
    > > On Error Resume Next only works with Trappable errors. I suspect, that

    if
    > > it isn't working, then you are getting an error that is not trappable.
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > >
    > > "Leadee" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > I just migrated all of my apps from Excel 2000 to Excel 2003. Now the

    VBA
    > > > code fails whereever I had an On Error Resume Next statement. It's as

    if
    > > that
    > > > statement is being ignored. My current error is a MAPI_E_NOT_FOUND

    error,
    > > > which is triggering a run time error even though I have an on error

    resume
    > > > next line above it. Any ideas as to how to trap this error in Excel

    2003?
    > >
    > >
    > >




  5. #5
    Chip Pearson
    Guest

    Re: Excel 2003 On Error Resume Next doesn't work for me

    > Avoid the error.

    Very well put.


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Tom Ogilvy" <[email protected]> wrote in message
    news:OZo24hB%[email protected]...
    > Avoid the error.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Leadee" <[email protected]> wrote in message
    > news:[email protected]...
    >> Thank you for the info. So what is the solution to work with
    >> non-trapple
    >> errors?
    >>
    >> "Tom Ogilvy" wrote:
    >>
    >> > On Error Resume Next only works with Trappable errors. I
    >> > suspect, that

    > if
    >> > it isn't working, then you are getting an error that is not
    >> > trappable.
    >> >
    >> > --
    >> > Regards,
    >> > Tom Ogilvy
    >> >
    >> >
    >> > "Leadee" <[email protected]> wrote in message
    >> > news:[email protected]...
    >> > > I just migrated all of my apps from Excel 2000 to Excel
    >> > > 2003. Now the

    > VBA
    >> > > code fails whereever I had an On Error Resume Next
    >> > > statement. It's as

    > if
    >> > that
    >> > > statement is being ignored. My current error is a
    >> > > MAPI_E_NOT_FOUND

    > error,
    >> > > which is triggering a run time error even though I have an
    >> > > on error

    > resume
    >> > > next line above it. Any ideas as to how to trap this error
    >> > > in Excel

    > 2003?
    >> >
    >> >
    >> >

    >
    >




  6. #6
    Leadee
    Guest

    Re: Excel 2003 On Error Resume Next doesn't work for me

    Unfortunately, I can't avoid the error. It is based on whether or not someone
    has entered a Custom Attribute field value into the user's outlook profile on
    the Exchange server. Since we're talking about potential human error, it is
    something I must attempt to trap. If I could test for a null value, that
    would be wonderful, but that also produces a run time error. I may be SOL and
    just hope that the person entering the values doesn't miss one. With hundreds
    of users, this is very likely though. Thanks for your suggestions.

    "Tom Ogilvy" wrote:

    > Avoid the error.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Leadee" <[email protected]> wrote in message
    > news:[email protected]...
    > > Thank you for the info. So what is the solution to work with non-trapple
    > > errors?
    > >
    > > "Tom Ogilvy" wrote:
    > >
    > > > On Error Resume Next only works with Trappable errors. I suspect, that

    > if
    > > > it isn't working, then you are getting an error that is not trappable.
    > > >
    > > > --
    > > > Regards,
    > > > Tom Ogilvy
    > > >
    > > >
    > > > "Leadee" <[email protected]> wrote in message
    > > > news:[email protected]...
    > > > > I just migrated all of my apps from Excel 2000 to Excel 2003. Now the

    > VBA
    > > > > code fails whereever I had an On Error Resume Next statement. It's as

    > if
    > > > that
    > > > > statement is being ignored. My current error is a MAPI_E_NOT_FOUND

    > error,
    > > > > which is triggering a run time error even though I have an on error

    > resume
    > > > > next line above it. Any ideas as to how to trap this error in Excel

    > 2003?
    > > >
    > > >
    > > >

    >
    >
    >


  7. #7
    Leadee
    Guest

    Re: Excel 2003 On Error Resume Next doesn't work for me

    Also, this does not change the issue whereby my "on error resume next"
    statements worked with most other errors in Excel 2000, but not in Excel
    2003. That is a somewhat separate issue, but begs an answer just the same.


    "Leadee" wrote:

    > Unfortunately, I can't avoid the error. It is based on whether or not someone
    > has entered a Custom Attribute field value into the user's outlook profile on
    > the Exchange server. Since we're talking about potential human error, it is
    > something I must attempt to trap. If I could test for a null value, that
    > would be wonderful, but that also produces a run time error. I may be SOL and
    > just hope that the person entering the values doesn't miss one. With hundreds
    > of users, this is very likely though. Thanks for your suggestions.
    >
    > "Tom Ogilvy" wrote:
    >
    > > Avoid the error.
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > > "Leadee" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > Thank you for the info. So what is the solution to work with non-trapple
    > > > errors?
    > > >
    > > > "Tom Ogilvy" wrote:
    > > >
    > > > > On Error Resume Next only works with Trappable errors. I suspect, that

    > > if
    > > > > it isn't working, then you are getting an error that is not trappable.
    > > > >
    > > > > --
    > > > > Regards,
    > > > > Tom Ogilvy
    > > > >
    > > > >
    > > > > "Leadee" <[email protected]> wrote in message
    > > > > news:[email protected]...
    > > > > > I just migrated all of my apps from Excel 2000 to Excel 2003. Now the

    > > VBA
    > > > > > code fails whereever I had an On Error Resume Next statement. It's as

    > > if
    > > > > that
    > > > > > statement is being ignored. My current error is a MAPI_E_NOT_FOUND

    > > error,
    > > > > > which is triggering a run time error even though I have an on error

    > > resume
    > > > > > next line above it. Any ideas as to how to trap this error in Excel

    > > 2003?
    > > > >
    > > > >
    > > > >

    > >
    > >
    > >


  8. #8
    Rob Bovey
    Guest

    Re: Excel 2003 On Error Resume Next doesn't work for me

    "Leadee" <[email protected]> wrote in message
    news:[email protected]...
    > Also, this does not change the issue whereby my "on error resume next"
    > statements worked with most other errors in Excel 2000, but not in Excel
    > 2003. That is a somewhat separate issue, but begs an answer just the same.


    Select Tools/Options/General from the VBE menu and make sure the Break
    on All Errors option isn't selected.

    --
    Rob Bovey, Excel MVP
    Application Professionals
    http://www.appspro.com/

    * Please post all replies to this newsgroup *
    * Unsolicited e-mail replies will be ignored *



  9. #9
    Leadee
    Guest

    Re: Excel 2003 On Error Resume Next doesn't work for me

    Break on All Errors option seems to be the default in Excel 2003, and I did
    have it set that way. Setting it to a lower setting didn't fix my CDO error
    mis-handling (because it seems to be a non-handled error), but it DID fix the
    ON ERROR RESUME NEXT errors that became ignored when I moved from Excel 2000
    to Excel 2003! Thank you very much. I appreciate your input.

    "Rob Bovey" wrote:

    > "Leadee" <[email protected]> wrote in message
    > news:[email protected]...
    > > Also, this does not change the issue whereby my "on error resume next"
    > > statements worked with most other errors in Excel 2000, but not in Excel
    > > 2003. That is a somewhat separate issue, but begs an answer just the same.

    >
    > Select Tools/Options/General from the VBE menu and make sure the Break
    > on All Errors option isn't selected.
    >
    > --
    > Rob Bovey, Excel MVP
    > Application Professionals
    > http://www.appspro.com/
    >
    > * Please post all replies to this newsgroup *
    > * Unsolicited e-mail replies will be ignored *
    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1