archangel1177
New Member
- Joined
- Jun 22, 2009
- Messages
- 31
I have a project that I am working on and I have the form built for entering data. What I have right now is code that will enter the data onto the first line of the sheet. But it will only out the data in the first row and never advances. Here is what I have.
Also if someone could point me in the right direction on how to have the user form clear after the submit button is clicked that would also be greatly appreciated. Here is a link to where I have the actual worksheet. Thanks in advance!https://www.dropbox.com/s/8l3cftajhideq7w/Order tracker prototype(2).xls
Code:
Private Sub CommandButton1_Click()
RowCount = Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
Sheets("Sheet1").Range("A2").Value = UserForm1.TextBox1.Value
Sheets("Sheet1").Range("B2").Value = UserForm1.TextBox2.Value
Sheets("Sheet1").Range("C2").Value = UserForm1.TextBox3.Value
Sheets("Sheet1").Range("D2").Value = UserForm1.TextBox4.Value
Sheets("Sheet1").Range("E2").Value = UserForm1.TextBox5.Value
Sheets("Sheet1").Range("F2").Value = UserForm1.TextBox6.Value
Sheets("Sheet1").Range("G2").Value = UserForm1.TextBox7.Value
Sheets("Sheet1").Range("H2").Value = UserForm1.TextBox8.Value
Sheets("Sheet1").Range("I2").Value = UserForm1.TextBox10.Value
Sheets("Sheet1").Range("J2").Value = UserForm1.TextBox9.Value
End Sub