Sub Nettoie()
Dim Sht As Worksheet, DCell As Range
Dim DxCell As Range
Dim Calc As Long, Rien As String
On Error Resume Next
Calc = Application.Calculation
With Application
.Calculation = xlCalculationManual
.StatusBar = "Nettoyage en cours"
.EnableCancelKey = xlErrorHandler
.ScreenUpdating = False
End With
For Each Sht In Worksheets
If Sht.UsedRange.Address <> "$A$1" Or _
Not IsEmpty(Sht.[A1]) Then
Set DCell = Sht.Cells.Find("*", _
, xlFormulas, , xlByRows, xlPrevious)(2)
If Not DCell Is Nothing Then
Sht.Range(DCell, Sht.Cells([A:A].Count, 1)). _
EntireRow.Clear
Set DCell = Nothing
Set DxCell = Sht.Cells.Find("*", , xlFormulas, _
, xlByColumns, xlPrevious)(2)
If Not DxCell Is Nothing Then
Sht.Range(DxCell.Offset(, 1), Sht.[IV1]). _
EntireColumn.Clear
End If
Rien = Sht.UsedRange.Address
End If
End If
Next Sht
Application.StatusBar = False
Application.Calculation = Calc
MsgBox "g"
End Sub