PDA

View Full Version : [SOLVED:] 3 cells USERFORM to enroll in one cell in excel



k0st4din
09-25-2012, 11:21 AM
Hi if you could help me to Complete the code 3 cells USERFORM to enroll in one cell in excel.
Call button in excel UserForm.
Cancel - button works
ADD - button -> pressed it to my cell transfer in anything written. For example, if a cell is a UserForm is not written, then in excel cell carries the rest.
I will attach the excel file and image to be seen.
Thanks in advance.

p45cal
09-25-2012, 04:56 PM
You don't say which cell to use for the destination on the sheet, nor do you say which 3 of the 4 textboxes you want to use, so I've guessed:Private Sub CommandButton1_Click()
With ActiveSheet
.Cells(.Rows.Count, "A").End(xlUp).Offset(1).Value = Application.Trim(Join(Array(TextBox1.Text, Me.TextBox2.Text, Me.TextBox3.Text)))
End With
End Sub

k0st4din
09-25-2012, 09:14 PM
Hello p45cal, I was so tired that she had a typo when writing. Do not worry, I have set the column and I type the 4 cell.
Many thanks for the quick response from your side.
Be alive and well.
Рegards