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
| Sub Dupliquer()
Application.ScreenUpdating = False
'Dupliquer
Dim lignes As Integer
Dim debut As Integer
Dim référence As Variant
debut = 1
ligne = Sheets("Feuil3").Range("H2")
référence = Sheets("Listing").Cells(ligne, 1)
If MsgBox("Etes-vous certain de vouloir dupliquer le contrat """ & référence & """ ?", vbYesNo + vbCritical, "Demande de confirmation") = vbYes Then
With Sheets("Listing").Cells(ligne, 1).EntireRow
.Offset(debut, 0).Insert Shift:=xlDown
.Copy Destination:=.Offset(debut, 0)
End With
With Sheets("Volume_PR").Cells(ligne, 1).EntireRow
.Offset(debut, 0).Insert Shift:=xlDown
.Copy Destination:=.Offset(debut, 0)
End With
With Sheets("Prime").Cells(ligne, 1).EntireRow
.Offset(debut, 0).Insert Shift:=xlDown
.Copy Destination:=.Offset(debut, 0)
End With
With Sheets("Volume_Prix").Cells(ligne, 1).EntireRow
.Offset(debut, 0).Insert Shift:=xlDown
.Copy Destination:=.Offset(debut, 0)
End With
With Sheets("Prix AA").Cells(ligne, 1).EntireRow
.Offset(debut, 0).Insert Shift:=xlDown
.Copy Destination:=.Offset(debut, 0)
End With
End If
Application.ScreenUpdating = True '
End Sub |
Partager