title: Adding New Tabs with Excel VBA
body: <p>The VBA below is supposed to look at a list on the Setup tab and create a new tab for each <code>JobName</code>. I'm getting an "out of range" error when executing.</p>
  
  <pre><code>Sub JobTabs()
  
  Application.ScreenUpdating = False
  Worksheets("Setup").Select
  For i = 7 To 100
      JobName = Sheets("Setup").Cells("D" &amp; i).Value
      If JobName = "" Then
          i = 100
      Else
          Sheets("Job A").Copy
          ActiveSheet.Name = JobName
      End If
  Next i
  
  End Sub
  </code></pre>