title: How to continue running a VBA macro when an SAP popup message tells us that there is no data found?
body: <p>When the sap script searches for data via SAP and finds nothing, it sends us a pop-up message saying "that it has not found any data", how to keep the macro running because later there are other transactions. </p>
  
  <pre><code> Sub FOS()
   ...
  
  On Error GoTo ConsoleAbs
  Set Sapgui = GetObject("SAPGUI")
  On Error GoTo 0
  
  'transaction1
  session.findById("wnd[0]").maximize
  session.findById("wnd[0]/tbar[0]/okcd").Text = "S_ALR_87011964"
  session.findById("wnd[0]/tbar[0]/btn[0]").press
  session.findById("wnd[0]/usr/ctxtBUKRS-LOW").Text = "0092"
  ...
  
  
  'transaction2
  
  session.findById("wnd[0]").maximize
  session.findById("wnd[0]/tbar[0]/okcd").Text = "S_ALR_87012039"
  session.findById("wnd[0]/tbar[0]/btn[0]").press
  ...
  
  End Sub
  </code></pre>
  
  <p>I've been trying          </p>
  
  <pre><code>On Error GoTo ConsoleAbs
  Set Sapgui = GetObject("SAPGUI")
  On Error GoTo 0
  </code></pre>
  
  <p>but I'm not sure that's the right solution.</p>