Bonjour,
Voici mon code. Ma macro fonctionne seulement si j'ai préalablement activer la feuille. Pourtant je vois que ma boucle passe sur toute les feuille.
Sub retrait_bloc_vide()
'''''''''''''''''''''''''''
Dim Arr_Sheets(6) As String
Dim Ob_Sheet As Worksheet
Const Flg_Check As String = "Part ASS"
Application.Calculation = xlCalculationManual
Arr_Sheets(0) = "PEM"
Arr_Sheets(1) = "SPOT"
Arr_Sheets(2) = "TIME SAVER"
Arr_Sheets(3) = "SOUDURE"
Arr_Sheets(4) = "FINITION"
Arr_Sheets(5) = "ASSEMBLAGE"
Arr_Sheets(6) = "PLIAGE"
For s = 0 To 6
Val_sh = Arr_Sheets(s)
Set Ob_Sheet = ThisWorkbook.Worksheets(Val_sh)
derniere_ligne = Ob_Sheet.Cells(Ob_Sheet.Rows.Count, 6).End(xlUp).Row
For i = derniere_ligne To 2 Step -1
val_a = Ob_Sheet.Cells(i, 6).Value
val_b = Ob_Sheet.Cells(i + 1, 6).Value
val_f = Ob_Sheet.Cells(i - 1, 6).Value
If val_a <> "" And val_f = "" And val_b = "" Then
Rows(i).EntireRow.Delete
End If
Next i
Next s
'derniere_ligne = Cells(Rows.Count, 3).End(xlUp).Row
Application.Calculation = xlCalculationAutomatic
MsgBox "Done"
End Sub