This is what i currently have:
Private Sub CommandButton1_Click()
<<< Dim LastRow As Object
Set LastRow = Sheet3.Range("a65536").End(xlUp)
LastRow.Offset(-19, 0).Value = TextBox1.Text
LastRow.Offset(-19, 1).Value = TextBox2.Text >>>
MsgBox "One record written to Sheet1"
response = MsgBox("Do you want to enter another record?", _
vbYesNo)
If response = vbYes Then
TextBox1.Text = ""
TextBox2.Text = ""
TextBox1.SetFocus
Else
Unload Me
End If
End Sub
i assume i replace the code i have put in < > with the code you added?
I did this and tried changing your code so it reads
Dim rng as Range
set rng = Worksheets("sheet3").Cells(rows.count,6).end(xlup)(2)
rng.Value = Textbox1.Text
rng.offset(0,1).Value = Textbox2.Text
but it comes up with an error and highlights the second line. Any idea
why?