locked
Suppress Error Notice RRS feed

  • Question

  • I am currently in the process the of completing a macro in excel.  It refers to some named cells that may be empty I want to suppress the Error message that reads: "A formula in this worksheet contains one or more invlaid references."  I have tried Application.DisplayAlerts = False, but this did not appear to work.  Any advice?

    • Moved by Chao Kuo Tuesday, October 12, 2010 11:01 AM VBA not VB.net (From:Visual Basic General)
    Tuesday, October 5, 2010 11:46 AM

All replies

  • You would need to handle that exception in a Try...Catch block, checking the Message of the Exception and then continuing on in your code if that particular exception is encountered.

    Paul ~~~~ Microsoft MVP (Visual Basic)
    Tuesday, October 5, 2010 12:15 PM
  • It depends on if this is a VB.Net Excel plugin or a VBA macro.  If it's a VBA macro you're going to need to use something like:

    "On Error Resume Next" or "On Error Goto 50" or "On Error Goto :ErrorHandler"

    Here is a document that will help you error handle if it's VBA:

    http://www.cpearson.com/excel/ErrorHandling.htm

     

    Tuesday, October 5, 2010 3:12 PM
  • Hello,

    This forum is VB.net only, for VBA issue, please post here http://social.msdn.microsoft.com/forums/en-US/isvvba/threads/.

    Thanks


    Chao


    Please unmark it if it does not help, and mark it if it helps.
    Friday, October 8, 2010 7:25 AM