Welcome to the Forum. Maybe:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim ws As Worksheet
Dim i As Long
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each ws In ActiveWorkbook.Worksheets
ws.Activate
For i = Range("A" & Rows.count).End(3)(1).Row To 2 Step -1
If Range("A" & i) <> "" Then
If Range("O" & i) = "" Or Range("P" & i) = "" Then
MsgBox "Sheets " & ws.Name & " is not complete"
Cancel = True
Exit For
Exit Sub
End If
End If
Next i
Next ws
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Bookmarks