Private Sub btnSubmit_Click()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Customers")
Dim nextRow As Long
nextRow = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row + 1
ws.Cells(nextRow, 1).Value = nextRow - 1 ' Customer ID
ws.Cells(nextRow, 2).Value = txtFirstName.Value
ws.Cells(nextRow, 3).Value = txtLastName.Value
ws.Cells(nextRow, 4).Value = txtEmail.Value
ws.Cells(nextRow, 5).Value = txtPhone.Value
ws.Cells(nextRow, 6).Value = txtCompany.Value
ws.Cells(nextRow, 7).Value = txtStatus.Value
ws.Cells(nextRow, 8).Value = Date ' Created Date
ws.Cells(nextRow, 9).Value = "" ' Last Contacted
ws.Cells(nextRow, 10).Value = txtNotes.Value
MsgBox "Customer added successfully!", vbInformation
Unload Me
End Sub
Private Sub btnCancel_Click()
Unload Me
End Sub