title: How to end one procedure (Sub, Function) from another in VB.net?
body: <p>I want to end a main sub from another sub.</p>
  <p>Here is an example code to illustrate what I need to do:</p>
  <pre><code>Sub main()
  
      endMainSub()
  
      'do other stuff
  
  End Sub
  
  Sub endMainSub()
  
      **'here I need a code to end main Sub**
  
  End Sub
  </code></pre>
  <p>From endMainSub, I would like to terminate main sub before &quot;do other stuff&quot;.
  I need something like &quot;End&quot; in VBA.</p>