jei eusebio
Member
Hi Ninjas,
My userform is now working great, thanks to Hui .. but now what I am trying to do is transfer the data from the userform to a certain sheet. It moves the data to the Tracker sheet but it only pastes data in Row 2, my headers start at row 3 .. and when I try to save another entry , it overrides the previous data.
Appreciate the help!
Thanks in advance!
My userform is now working great, thanks to Hui .. but now what I am trying to do is transfer the data from the userform to a certain sheet. It moves the data to the Tracker sheet but it only pastes data in Row 2, my headers start at row 3 .. and when I try to save another entry , it overrides the previous data.
Appreciate the help!
Thanks in advance!
Private Sub CommandButton1_Click()
Dim irow As Long
Dim ws As Worksheet
Set ws = Worksheets("Tracker")
'find first row in database
irow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
With ws
.Range("B" & irow) = ComboBox1.Value
.Range("E" & irow) = TextBox2.Value
.Range("F" & irow) = TextBox1.Value
.Range("G" & irow) = TextBox3.Value
.Range("H" & irow) = TextBox4.Value
.Range("I" & irow) = TextBox5.Value
.Range("J" & irow) = TextBox6.Value
End With
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
End Sub