Thanks Dave,
For some reason it does not work!
This is part of the code I have. Any help would be great!
Option Explicit
Private Sub CommandButton1_Click()
Dim LastRow As Object
Application.EnableEvents = False
Set LastRow = Sheet2.Range("a100").End(xlUp)
LastRow.Offset(1, 0).Value = TextBox1.Text
LastRow.Offset(1, 1).Value = TextBox2.Text
If vbYes Then
TextBox1.Text = ""
TextBox2.Text = ""
ComboBox1.Text = ""
ComboBox2.Text = ""
Else
End If
Set LastRow = Sheet5.Range("a100").End(xlUp)
LastRow.Offset(1, 0).Value = TextBox3.Text
LastRow.Offset(1, 1).Value = TextBox4.Text
MsgBox "Do you want to enter another record?", vbYesNo
If vbYes Then
TextBox3.Text = ""
TextBox4.Text = ""
ComboBox3.Text = ""
ComboBox4.Text = ""
TextBox1.SetFocus
Application.EnableEvents = True
Call CommandButton99_Click
Else
End If
End Sub