Sub AfficherUF_Erreur()
Dim Wsh As Worksheet
Dim RngErr As Range, Cel As Range
For Each Wsh In ActiveWorkbook.Worksheets
On Error Resume Next
Set RngErr = Wsh.Cells.SpecialCells(xlCellTypeFormulas, xlErrors)
If Err = 0 Then
For Each Cel In RngErr
UF_Erreurs.ListBoxErreurs.AddItem Choose((CLng(Cel.Value) - 1993) \ 7, _
"#NUL!", "#DIV/0!", "#VALEUR!", "#REF!", "#NOM?", "#NOMBRE!", "#N/A")
UF_Erreurs.ListBoxErreurs.List(UF_Erreurs.ListBoxErreurs.ListCount - 1, 1) = Wsh.Name
UF_Erreurs.ListBoxErreurs.List(UF_Erreurs.ListBoxErreurs.ListCount - 1, 2) = Cel.Address(False, False)
Next Cel: End If
Err.Clear
Set RngErr = Wsh.Cells.SpecialCells(xlCellTypeConstants, xlErrors)
If Err = 0 Then
For Each Cel In RngErr
UF_Erreurs.ListBoxErreurs.AddItem Choose((CLng(Cel.Value) - 1993) \ 7, _
"#NUL!", "#DIV/0!", "#VALEUR!", "#REF!", "#NOM?", "#NOMBRE!", "#N/A")
UF_Erreurs.ListBoxErreurs.List(UF_Erreurs.ListBoxErreurs.ListCount - 1, 1) = Wsh.Name
UF_Erreurs.ListBoxErreurs.List(UF_Erreurs.ListBoxErreurs.ListCount - 1, 2) = Cel.Address(False, False)
Next Cel: End If
On Error GoTo 0: Next Wsh
If UF_Erreurs.ListBoxErreurs.ListCount = 0 Then
MsgBox "Aucune cellule en erreur trouvée dans ce classeur", vbInformation, "Voir les erreurs"
Else: UF_Erreurs.Show 0: End If
End Sub