title: On Error Resume next not working VBA
body: <p>I am using the Ctrl+F simulation using Macros for find a particular number from a sheet, I have added the On error resume next code in case it fails to find the value but the error handling is not working  , I am getting the following message.</p>
  
  <p><a href="https://i.stack.imgur.com/bJnQx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bJnQx.jpg" alt="enter image description here"></a></p>
  
  <p>Here is the code:</p>
  
  <pre><code>Sheets("Not filled").Activate
  
      On Error Resume Next
  
      Cells.Find(what:=refnumber, After:=ActiveCell, LookIn:=xlFormulas, _
      lookat:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
      MatchCase:=False, SearchFormat:=False).Activate
  </code></pre>