Create the headers for your table (Name, Surname, etc).
On the userform create Textboxes that relate to the specific column headers (as seen in the code of the attached project).
Private Sub btnOK_Click()
Cells(Rows.Count, 4).End(xlUp).Offset(1).Resize(, 4) = Array(txtFirstName, txtSurname, "snb", "much simpler")
End Sub
REPLACES THIS MACRO :
Private Sub btnOK_Click()
Dim ws As Worksheet
Set ws = ActiveSheet
Dim newRow As Long
newRow = Application.WorksheetFunction.CountA(ws.Range("A:A")) + 1
'The next two lines can be expanded as many times as needed for all the entry fields in your project
ws.Cells(newRow, 1).Value = Me.txtFirstName.Value
ws.Cells(newRow, 2).Value = Me.txtSurname.Value
End Sub
Bookmarks