Sub allerversmiseencarton()
'
' allerversmiseencarton Macro
' Macro enregistrée le 11/06/2010 par quinquis
'
[COLOR="Red"][B]Dim LgDeb As Integer, LgFin As Integer, Lg As Integer[/B][/COLOR]
With Sheets("Inventaire production")
Set cel = Intersect(.Range("A7:F" & .Range("C65536").End(xlUp).Row), ActiveCell)
If cel Is Nothing Then Exit Sub
[COLOR="Red"][B]For Lg = 1 To Selection.Rows.Count
If Lg = 1 Then LgDeb = Selection.Row
LgFin = LgDeb + Lg - 1
Next[/B][/COLOR]
End With
ActiveSheet.Unprotect "293"
Sheets("Mise en carton").Unprotect "293"
With Range("A" & [COLOR="Red"][B]LgDeb[/B][/COLOR] & ":F" & [COLOR="Red"][B]LgFin[/B][/COLOR])
.Copy Destination:=Feuil2.Range("C65536").End(xlUp).Offset(1, 0)
.Delete
End With
Range("G7:G200").Select
Selection.Locked = False
ActiveSheet.Protect "293"
Sheets("Mise en carton").Protect "293"
End Sub