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
| Sub MACROTOURNE1()
Dim c As Integer
Dim v As Integer
Dim k As Integer
c = 5
v = c
Do Until Cells(2, 8).Value = c
Windows("ABCD.xls").Activate
Sheets("6B").Select
nom = Cells(c, 4).Value
days = Format(Date, "yyyy-mm-dd")
fichier = nom & days & ".xls"
If Cells(c, 4).Value <> "ABCD" And Cells(c, 4).Value <> "Interne" And Cells(c, 4).Value <> "" Then
Rows(c).Select
Selection.copy
Windows(fichier).Activate
Sheets("6B").Select
Rows(v).Select
ActiveSheet.Paste
'Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End If
c = c + 1
v = v + 1
Loop
End Sub |