title: How to loop through textboxes (userform1.textbox1 to userform1.textbox2)
body: <p>How can I specify that with each For/next cycle, the number of the textbox should increase by one, from Userform1.Textbox1 to Userform1.Textbox2 and so on for each sheet in the workbook?</p>
  
  <p>I am trying  "UserForm1.TextBox &amp; i" and "i = i + 1"
  But I get a syntax error.</p>
  
  <p>Any advice?</p>
  
  <pre><code>Application.ScreenUpdating = False
  SheetName = ActiveSheet.Name
  FindString = InputBox("Enter the case number to search for:")
  
  i = 1
  
  For Each ws In Worksheets
      If ws.Name Like "lang*" Then
          With ws
  
              If Trim(FindString) &lt;&gt; "" Then
                  With Sheets(1).Range("A:A")
                      Set Rng = .Find(What:=FindString, _
                                      After:=.Cells(.Cells.Count), _
                                      LookIn:=xlValues, _
                                      LookAt:=xlWhole, _
                                      SearchOrder:=xlByRows, _
                                      SearchDirection:=xlNext, _
                                      MatchCase:=False)
                      If Not Rng Is Nothing Then
  
              UserForm1.TextBox &amp; i = ActiveSheet.Name &amp; "     " &amp; _
              Rng.Offset(0, 2).Value &amp; "     " &amp; _
  
              i = i + 1
  
                      Else: GoTo NotFound
                      End If
                  End With
              End If
  
          End With
      End If
  Next ws
  
  Sheets(SheetName).Activate
  Application.ScreenUpdating = True
  UserForm1.Show
  </code></pre>