title: Return to a certain routine when an IF condition is not met
body: <p>Facing an issue with coming up with a way to send back my code to a certain place when an IF condition is not met. In the code below, I have included an input box requiring data to be entered however through an IF condition I want to make sure atleast 8 digits are entered, If less than 8 digits are entered then I want to show a msg box &quot;Error&quot; and return to GL_Code position asking user to fill the inputbox again.</p>
  <pre><code>Dim GL_CY As Variant
  Dim GL_Book As Workbook
  GL_CY = Application.GetOpenFilename(Title:=&quot;Open GL&quot;, FileFilter:=&quot;Excel Files (*.xls*),*xls*&quot;)
  Set GL_Book = Application.Workbooks.Open(GL_CY)
  
  'Filtering Range
  Dim GL_Code As Variant, GL_Rng As range, GL_LR As Long
  Dim GL_Sheet As Worksheet
  Set GL_Sheet = GL_Book.Worksheets(1)
  GL_LR = GL_Sheet.range(&quot;B&quot; &amp; Rows.Count).End(xlUp).Row
  GL_Code = Application.InputBox(Prompt:=&quot;Enter GL code to generate its activity &quot;, Title:=&quot;Generate GL Activity&quot;, Type:=1)
     If VBA.IsError(GL_Code) Then
     GoTo ErrorHandle
     ElseIf Len(GL_Code) &lt; 8 Then
      MsgBox &quot;GL Code Not Entered&quot;, , &quot;Error&quot;
      'Return To GL_Code
      
     End If
  
  Set GL_Rng = GL_Sheet.range(&quot;A4:R&quot; &amp; GL_LR).CurrentRegion.Offset(3, 0)
  </code></pre>
  <p>Relevant part of the issue is (Need a code for the commented part at the last line)</p>
  <pre><code>   GL_Code = Application.InputBox(Prompt:=&quot;Enter GL code to generate its activity &quot;, Title:=&quot;Generate GL Activity&quot;, Type:=1)
     If VBA.IsError(GL_Code) Then
     GoTo ErrorHandle
     ElseIf Len(GL_Code) &lt; 8 Then
      MsgBox &quot;GL Code Not Entered&quot;, , &quot;Error&quot;
      'Return To GL_Code
  </code></pre>