Hi,
I want users to be able to write data in several textboxes in one userform and then I want all of them to be saved in one cell by using "/". My current code is the following but I want to add TextBox13 and TextBox16 to the same cell as TextBox12.
Thank you in advance!
Private Sub CommandButton1_Click()
'Copy input values to sheet.
Dim lRow As Long
Dim ws As Worksheet
Set ws = Worksheets("5")
lRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
With ws
.Cells(lRow, 1).Value = Me.TextBox1.Value
.Cells(lRow, 2).Value = Me.TextBox2.Value
.Cells(lRow, 3).Value = Me.TextBox3.Value
.Cells(lRow, 4).Value = Me.TextBox4.Value
.Cells(lRow, 5).Value = Me.TextBox5.Value
.Cells(lRow, 6).Value = Me.TextBox6.Value
.Cells(lRow, 7).Value = Me.TextBox7.Value
.Cells(lRow, 8).Value = Me.TextBox8.Value
.Cells(lRow, 9).Value = Me.TextBox9.Value
.Cells(lRow, 10).Value = Me.TextBox10.Value
.Cells(lRow, 11).Value = Me.TextBox11.Value
.Cells(lRow, 12).Value = Me.TextBox12.Value
End With
'Clear input controls.
Me.TextBox1.Value = ""
Me.TextBox2.Value = ""
Me.TextBox3.Value = ""
Me.TextBox4.Value = ""
Me.TextBox5.Value = ""
Me.TextBox6.Value = ""
Me.TextBox7.Value = ""
Me.TextBox8.Value = ""
Me.TextBox9.Value = ""
Me.TextBox10.Value = ""
Me.TextBox11.Value = ""
Me.TextBox12.Value = ""
Bookmarks