1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| For i = 1 To 30
ligne = i + 6
Sheets("onglet").Visible = True
Nom = Sheets("onglet").Range("A" & ligne).Value
If Nom = "" Then
Exit For
End If
Sheets(Nom).Select
Cells.Find(What:="Le Directeur d'Etablissement,", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate
Column = Selection.Column
Row = Selection.Row
Row = Row + 1
Cells(Row, Column) = Direct.Value
Cells.Select
Selection.Copy
Dim SourceFiles, DestFiles
SourceFiles = "C:\Documents and Settings\710915v\Bureau\Programmes\A faire\ex01.xls"
DestFiles = astreint & "\AS01.xls"
Open DestFiles For Output As #i
FileCopy SourceFiles, DestFiles
Application.CutCopyMode = False
Next i |
Partager