استبدل هذا الجزء
Sheets("Programmation").Select
Range("A2:I1105").Select
Selection.ClearContents
Sheets("Enregistrement").Select
''''''''''''''''''''''''''''''''''''''
lr = Cells(Rows.Count, 1).End(xlUp).Row
For r = 8 To lr
If Cells(r, 8).Value = Empty Then GoTo 2
If Cells(r, 8).Value = "ok" Then
Range(Cells(r, 1), Cells(r, 9)).Copy
y = ThisWorkbook.Worksheets("Programmation").Cells(Rows.Count, 1).End(xlUp).Row + 1
ThisWorkbook.Worksheets("Programmation").Range("a" & y).PasteSpecial xlPasteValues
End If
بهذا الجزء
m = 7
Sheets("Programmation").Select
Range("A2:I1105").Select
Selection.ClearContents
Sheets("Enregistrement").Select
''''''''''''''''''''''''''''''''''''''
lr = Cells(Rows.Count, 1).End(xlUp).Row
For r = 8 To lr
If Cells(r, 8).Value = Empty Then GoTo 2
If Cells(r, 8).Value = "ok" Then
m = m + 1
Range(Cells(r, 1), Cells(r, 9)).Copy
ThisWorkbook.Worksheets("Programmation").Range("a" & m).PasteSpecial xlPasteValues
End If