1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| Public Sub ouverture()
Dim NomClass As String, Feuille As Worksheet, Liste As Worksheet, LigListe As Integer
Dim VARO As Integer
Dim WBSource As Workbook, WBDest As Workbook
Dim i As Integer
i = 10
NomClass = Dir(ThisWorkbook.Path & "\*.xls")
Do Until NomClass = ""
If NomClass <> ThisWorkbook.Name Then
Workbooks.Open ThisWorkbook.Path & "\" & NomClass
LigListe = LigListe + 1
lignefin = Worksheets(1).Cells(200, 1).End(xlUp).Row
For VARO = 10 To lignefin
If Cells(VARO, 1).Selection.Font.ColorIndex = 5 Then
Rows(VARO).EntireRow.Copy
Workbooks("Suivi des CAP-1").Activate
Range("a" & i).Select
Selection.Paste
i = i + 1
End If
Next
Workbooks(NomClass).Close False
End If
NomClass = Dir()
Loop
End Sub |
Partager