Hi,

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim r As Long, a, i As Long
r = Sheets("Sheet1").Range("a1").CurrentRegion.Rows.Count
a = Range(Cells(r, 1), Cells(r, 6))
For i = 1 To UBound(a, 2)
    If Len(Application.Trim(a(1, i))) = 0 Then
        MsgBox "Please enter all mandatory fields!"
        Sheets("Sheet1").Cells(r, i).Activate
        Cancel = True
    End If
Next
End Sub