.
Option Explicit


Private Sub btnCancel_Click()
    Unload Me
End Sub


Private Sub btnOK_Click()
    Dim ws As Worksheet
    Set ws = ActiveSheet
    Dim newRow As Long
    
    newRow = Application.WorksheetFunction.CountA(ws.Range("D:D")) + 1
    
    'The next two lines can be expanded as many times as needed for all the entry fields in your project
    
    
    ws.Cells(newRow, 4).Value = Me.txtFirstName.Value
    ws.Cells(newRow, 5).Value = Me.txtSurname.Value
    
End Sub
Sub CommandButton1_Click()
    Selection.EntireRow.Delete
End Sub