J'aurais besoin de vos lumières pour m'aider à décripter tous ce language, je ne comprends pas toutes les subtilitées de VB pour excel.
J'ai besoin de comprendre ces deux macros pour les reproduire sur un nouveau fichier.
Par avance, merci.
- Code: Tout sélectionner
Sub TRIER_SALLE()
Rows("4:9").Select
Selection.Sort Key1:=Range("A4"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Rows("11:63").Select
Selection.Sort Key1:=Range("A11"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
ActiveWindow.LargeScroll Down:=-2
Range("A4:AF4").Select
Selection.Interior.ColorIndex = 35
Range("A5:AF5").Select
With Selection.Interior
.ColorIndex = 2
.Pattern = xlSolid
End With
Range("A4:AF5").Select
Selection.Copy
Range("A6:A9").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("A11:AF11").Select
With Selection.Interior
.ColorIndex = 35
.Pattern = xlSolid
End With
Range("A12:AF12").Select
Selection.Interior.ColorIndex = 2
Range("A11:AF12").Select
Selection.Copy
ActiveWindow.LargeScroll ToRight:=-2
Range("A13:A63").Select
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("A13:AF63").Select
Range("A63").Activate
ActiveWindow.LargeScroll ToRight:=-1
Application.CommandBars("Stop Recording").Visible = False
End Sub
et celle là
- Code: Tout sélectionner
Sub TRIER_LUNDI()
Sheets("lundi").Select
ActiveSheet.Unprotect
Selection.AutoFilter Field:=1
Rows("7:59").Select
Selection.Sort Key1:=Range("B7"), Order1:=xlAscending, Key2:=Range("C7") _
, Order2:=xlAscending, Key3:=Range("D7"), Order3:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
ActiveWindow.LargeScroll Down:=1
Rows("66:95").Select
Selection.Sort Key1:=Range("B66"), Order1:=xlAscending, Key2:=Range("C66" _
), Order2:=xlAscending, Key3:=Range("D66"), Order3:=xlAscending, Header _
:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
ActiveWindow.LargeScroll Down:=-2
Selection.AutoFilter Field:=1, Criteria1:="<>"
Range("a6").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Merci d'avance.