Excel: Suppressing Error Alerts in Macro or Branching at ErrorLast reviewed: October 31, 1994Article ID: Q31691 |
SUMMARYTo temporarily turn error checking off during a macro, use the function =ERROR(FALSE). To run a different macro if an error occurs, use the function =ERROR(TRUE,ref), where ref is the reference of the macro to run should an error occur. For example, when using DATA.FIND(TRUE) in a macro, to prevent the "No Match" alert when no database records match the criteria on the worksheet, use the following macro steps
=ERROR(TRUE,ref) =DATA.FIND(TRUE)where ref is the location to go to when DATA.FIND(TRUE) does not find any records. This procedure can be can be used with other functions, such as FORMULA.FIND() and OPEN().
|
KBCategory: kbother
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |