Option Explicit

Private Sub workbook_BeforeSave1(ByVal SaveAsUI As Boolean, Cancel)
Dim i As Integer, MyWb As Object
i = 1
Set MyWb = ThisWorkbook.Sheets("WorkbookBeforeSave").Cells

Do While MyWb(2, i).Value <> ""
i = i + 1
Loop

If i = 5 Then
Exit Sub
End If

MsgBox ("Please enter all the mandatory fields"), vbCritical
Cancel = True

End Sub