title: Problems with go to label function
body: <p>I am running the following macro to open 130 excel files, and copy them in separate sheets for each entity. It sort of works for what I want to do (although probably not the most efficient). Once a sheet already exists, I want the macro not to create a new sheet again, but skip this step.</p>
  <p>I am trying to use the on error code for this, however I can't get the following part to work properly:</p>
  <pre><code>On Error Goto skip
  </code></pre>
  <p>Even if the formula below this code has an error, it keeps giving back the notification &quot;subscript out of range&quot;.</p>
  <p>Does anyone have a clue what I'm doing wrong here?</p>
  <pre><code>Sub Macro2()
  
  'Select item Location
  Row = 2
  nextitem: Row = Row + 1
  
  ' Create sheet
  Sheets(&quot;Location&quot;).Select
  Week = ActiveSheet.Range(&quot;c1&quot;).Value
  Complete = ActiveSheet.Range(&quot;b&quot; &amp; Row).Value
  Entity = ActiveSheet.Range(&quot;a&quot; &amp; Row).Value
  Workbook_Entity = Entity &amp; &quot; - Week &quot; &amp; Week &amp; &quot;.xlsx&quot;
  
  If Complete = &quot;Yes&quot; Then
      GoTo nextitem
      Else
  
  On Error GoTo Skip
  Sheets(Entity).Select
  GoTo Skipped2
  
  Exit Sub
  
  Skip:
  Sheets.Add(After:=Sheets(Sheets.Count)).Name = Entity
  
  Skipped2:
  
  'Open Workbooks
  
  Workbooks.Open Filename:=ThisWorkbook.Path &amp; &quot;\location\&quot; &amp; Workbook_Entity
  
  Sheets(&quot;Week - Hidden&quot;).Visible = True
  Sheets(&quot;Week - Hidden&quot;).Select
  Columns(&quot;A:G&quot;).Select
  Selection.Copy
  Windows(&quot;Overview.xlsm&quot;).Activate
  Sheets(Entity).Select
  Range(&quot;a1&quot;).Select
  Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
      :=False, Transpose:=False
  Windows(Workbook_Entity).Activate
  ActiveWorkbook.Save
  Sheets(&quot;Week - Hidden&quot;).Visible = False
  ActiveWindow.Close
  
  'Rotate
  If Item_Region = &quot;003&quot; Then
  
  GoTo Enditall
  
  Else
  
  GoTo nextitem
  
  Enditall:
  
  End If
  End If
  
  End Sub
  </code></pre>