title: Word vba multiple table selection
body: <p>I need a VBA code for MS Word that selects multiple tables (of my choosing) and inputs a string based on the textbox object. I've written a code that does this, but it would become repetitive if I was to select large number of tables.</p>
  
  <pre><code>Private Sub Claim_Change()
  
    Dim j As Table
    Set j = ActiveDocument.Tables(2)
    Dim k As Table
    Set k = ActiveDocument.Tables(3)
  
  'Input claim
  j.Select
  Selection.Delete
  
  With j
  .Cell(1, 1).Range.InsertAfter "Claim #: " &amp; Claim
  .Cell(1, 2).Range.Text = Format(Date, "MMMM DD, YYYY ")
  .Columns.AutoFit
  End With
  
  k.Select
  Selection.Delete
  
  With k
  .Cell(1, 1).Range.InsertAfter "Claim #: " &amp; Claim
  .Cell(1, 2).Range.Text = Format(Date, "MMMM DD, YYYY ")
  .Columns.AutoFit
  
  End With
  Claim.Select
  
  End Sub
  </code></pre>
  
  <p>Is there a simpler way to put this code together?</p>