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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
Sub ajoutavecdate4()
Dim a, I As Byte
Dim Dt
Dt = Calendard.Chargement(Caption:="Entrer une date") ' InputBox("Entrer une date")
If Dt = False Then MsgBox "ERR": Exit Sub
For I = 1 To Sheets.Count
If InStr(1, Sheets(I).Name, "Data_S") <> 0 Then
With Sheets(I).ListObjects(1).Range
.Rows(.Rows.Count).Copy .Rows(.Rows.Count + 1)
.Cells(.Rows.Count + 1, 1) = TrouveType(Dt)
End With
End If
Next I
For I = 1 To Sheets.Count
If InStr(1, Sheets(I).Name, "Data_I") <> 0 Then
With Sheets(I).ListObjects(1).Range
.Rows(.Rows.Count).Copy .Rows(.Rows.Count + 1)
.Cells(.Rows.Count + 1, 1) = TrouveType(Dt)
End With
End If
Next I
For I = 1 To Sheets.Count
If InStr(1, Sheets(I).Name, "Data_R") <> 0 Then
With Sheets(I).ListObjects(1).Range
.Rows(.Rows.Count).Copy .Rows(.Rows.Count + 1)
'.Cells(.Rows.Count + 1, 1) = TrouveType(Dt)
.Cells(.Rows.Count + 1, 73) = Sheets("Fiche").Range("Nom_conc_Indiv_1_R_Corrigée")
.Cells(.Rows.Count + 1, 74) = Sheets("Fiche").Range("Qté_jour_conc_Indiv_1_R_Corrigée")
.Cells(.Rows.Count + 1, 75) = Sheets("Fiche").Range("prix_conc_Indiv_1_R_Corrigée")
.Cells(.Rows.Count + 1, 76) = Sheets("Fiche").Range("Nom_conc_Indiv_2_R_Corrigée")
.Cells(.Rows.Count + 1, 77) = Sheets("Fiche").Range("Qté_jour_conc_Indiv_2_R_Corrigée")
.Cells(.Rows.Count + 1, 78) = Sheets("Fiche").Range("prix_conc_Indiv_2_R_Corrigée")
.Cells(.Rows.Count + 1, 79) = Sheets("Fiche").Range("Nom_conc_Indiv_3_R_Corrigée")
.Cells(.Rows.Count + 1, 80) = Sheets("Fiche").Range("Qté_jour_conc_Indiv_3_R_Corrigée")
.Cells(.Rows.Count + 1, 81) = Sheets("Fiche").Range("prix_conc_Indiv_3_R_Corrigée")
With .Rows(.Rows.Count + 1)
For j = 39 To 55
.Cells(j) = .Cells(j + 15)
'.Cells(j + 9) = ""
Next j
End With
End With
End If
Next I
End Sub |
Partager