Hi All,

I tried below code to delete a row in excel using userform

Dim currentrow As Long

Private Sub CommandButton3_Click()
answer = MsgBox(“Are you sure you wish to delete the record?”, vbYesNo + vbQuestion, “Delete Record?”)
If answer = vbYes Then
Cells(currentrow, 1).EntireRow.Delete
End If
End Sub
it doesn't work, need your kind assistance to correct the code.

thank you very much