1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Case 5 ' une ligne non vide a été supprimée
Set ExtrSh = ThisWorkbook.Sheets("Extraction")
Cr = OldRow(CrCol)
No = OldRow(NoCol)
RowWithCrAndNoFound = RowWithCrAndNo(ExtrSh, Cr, No, CrCol, NoCol, "F")
If RowWithCrAndNoFound > 0 Then
Application.EnableEvents = False ' sans effet
ExtrSh.Rows(RowWithCrAndNoFound).Delete ' Supprime la ligne RowWithCrAndNoFound
' ActiveSheet.Select ' sans effet
' ActiveSheet.Cells(Selection.Row, 1).Select ' sans effet
SendKeys "{RIGHT}{LEFT}"
Application.Wait Now + TimeValue("00:00:2")
Application.EnableEvents = True ' sans effet
End If
End Select
Set ExtrSh = Nothing
End Sub |