title: VBA Several UserForms export to Sheet
body: <p>In my Workbook i have several identical UserForms. Only the name is different.
  For Example WKA1 / WKA2 / WKS1 / WKS2 / PM1 / PM2 and some more.</p>
  
  <p>Now i want if i click on the CommandButton on the UserForm, that the Data in the TextBoxes will be saved on a extra Worksheet. I want that with a seperate Macro, so that i code for the CommandButton looks like this:</p>
  
  <pre><code>Private Sub CommandButton1_Click()
      Call Save_UF_Data
      [NameOfUF].Hide
  End Sub
  </code></pre>
  
  <p>The Problem is, i don´t know how to write in the Macro "Save_UF_Data" that it always takes the TextBox from the UF which is open.</p>
  
  <p>I already tried it with:</p>
  
  <pre><code>Me.Controls("TextBox1")
  </code></pre>
  
  <p>I hope someone can show me how i have to write the code that my macro will work for every UserForm in my Workbook.</p>
  
  <p>This is my Macro so far:</p>
  
  <pre><code>Public Sub Save_UF_Data()
       Dim lastrow As Long
       Dim a As Integer
       Dim ws As Worksheet
  
       Set ws = Worksheet("UserForm_Data")
       lastrow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
       a = 1
  
       Do
           ws.Range("A" &amp; lastrow).Value = Me.Controls("Label" &amp; a)    ' How do i have to change this part that it takes the value from the userform which is open?
           a = a + 1
           lastrow = lastrow + 1
       Loop Until a = 25
  End Sub
  </code></pre>