Hi,
Firstly I'm a complete VBA newbie so bear with me!
I'm exploring and learning about user forms and I've cracked the basics. However, the problem is that whenever I input data via the user form, it replaces what was input before.
So my VBA for a command button to capture the data is this.....
Private Sub cmdSave_Click()
erow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Cells(erow, 1) = DatePick
Cells(erow, 2) = CheckBox1.Value
Cells(erow, 3) = cmbActivity.Text
Cells(erow, 4) = tbDuration.Text
Cells(erow, 5) = tbMileage
Cells(erow, 6) = tbLogDetails.Text
End Sub
When I run the form for the first time it places the captured data on row 2 in Sheet1 as it should under the correct headings in row 1. However, if I then submit some new data via the user form, the data in row 2 is replaced with the newly submited data. In fact every time the user form is run, it just replaces what's on row 2 of Sheet1 with new data. Where am I going wrong?
Many thanks.
Bookmarks