title: How to loop over collection of textbox and range
body: <p>I'm new to <code>vba</code> and I can't manage to do what I want although it's very simple.</p>
  
  <p>I need to automatically add textbox values from a userform to my second sheet. For example in each textboxes I provide an integer and I want to put this values 1 by 1 on the range <code>C5:C52</code>.
  I have the following code that loop trough my textbox collection and range <code>C5:C52</code> </p>
  
  <pre><code>Sub remplissageTab()
      Dim rng As Range
      Dim cell As Range
      Set rng = Sheets("Câbles").Range("C5:C52")
  
      For Each txtBox In clcTxt
          For Each cell In rng
              cell.Value = CInt(txtBox)
          Next cell
      Next txtBox
  
      Unload Me
  
  End Sub
  </code></pre>
  
  <p>However the results is not what I expect. It only prints the last textbox value through all ranges. But I want all values in the same order textboxes are created.</p>
  
  <p>I hope I made clear explanations.
  What do you think ?</p>
  
  <p>Thanks a lot for your help. Lyess</p>