Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim n&, xrg As Range, T, ok As Boolean, i&, j, L, S, ko As Boolean
With Sheets("clients")
n = .Cells(.Rows.Count, "a").End(xlUp).Row
If n = 1 Then Exit Sub
T = .Range("a2:p" & n).Value: n = 0: ok = True
For i = 1 To UBound(T)
L = "": ko = False
For Each j In Array(1, 2, 3, 4, 5, 6, 7, 9, 10, 16)
L = L & T(i, j)
Next j
If Trim(L) <> "" Then
For Each j In Array(1, 2, 3, 4, 5, 6, 7, 9, 10, 16)
If T(i, j) = "" Then
S = S & " " & Cells(i + 1, j).Address(0, 0)
ok = False
ko = True
End If
Next j
If ko Then S = S & vbLf
End If
Next i
If Not ok Then
MsgBox "Il existe des cellules devant être renseignées : " & vbLf & _
S, vbExclamation + vbOKOnly
If MsgBox("Voulez-vous MALGRE TOUT fermer le fichier ?", _
vbQuestion + vbYesNo + vbDefaultButton2) = vbNo Then
Cancel = True
.Activate
.Range(Split(Trim(S))(0)).Select
End If
End If
End With
End Sub