Tris (P)06/2010 MyLzz59
Collez ce code dans un Nouveau Module
et exécutez-le pour générer l'Interface..
' -------------------------MyLzz59-
' Crée l'Interface de Tris
' ------------------------
Sub MeFTris()
Const Cf = &H800080, Cj = &HFFCCCC, Ch = &HFF99CC
' Général
Application.DisplayAlerts = False
While Sheets.Count > 1: Sheets(Sheets.Count).Delete: Wend
Sheets(1).Name = "Tris": ActiveWindow.Zoom = 67
With Cells
.EntireRow.Hidden = True: .EntireColumn.Hidden = True
.HorizontalAlignment = xlCenter: .VerticalAlignment = xlCenter
.WrapText = True
With .Font
.Name = "Lucida Console": .FontStyle = "Normal": .Size = 16
End With
End With
' Fond
With Range("A1:Q22")
Application.Goto Reference:="R1C1:R22C17"
.EntireRow.Hidden = False: .EntireColumn.Hidden = False
.ColumnWidth = 5: .RowHeight = 30
.Interior.Pattern = xlSolid: .Interior.Color = Cf
End With
Range("A1").Select
' Aire de Jeu
With Range("B2:K21")
.Borders(xlEdgeLeft).Weight = xlThick
.Borders(xlEdgeTop).Weight = xlThin
.Borders(xlEdgeBottom).Weight = xlThick
.Borders(xlEdgeRight).Weight = xlThick
.Borders(xlInsideVertical).Weight = xlThin
.Borders(xlInsideHorizontal).Weight = xlThin
.Interior.Pattern = xlSolid: .Interior.Color = Cj
End With
' Lignes
With Range("M3:P3")
.MergeCells = True: .Value = "Lignes"
.Borders(xlEdgeLeft).Weight = xlThick
.Borders(xlEdgeTop).Weight = xlThick
.Borders(xlEdgeRight).Weight = xlThick
.Borders(xlEdgeBottom).Weight = xlThin
.Interior.Pattern = xlSolid: .Interior.Color = Ch
End With
With Range("M4:P4")
.MergeCells = True: .Value = 0
.Borders(xlEdgeLeft).Weight = xlThick
.Borders(xlEdgeBottom).Weight = xlThick
.Borders(xlEdgeRight).Weight = xlThick
.Borders(xlEdgeTop).Weight = xlThin
.Interior.Pattern = xlSolid: .Interior.Color = Cj
End With
' Points
Range("M3:P4").Copy Range("M6"): Range("M6").Value = "Points"
' Pièces
Range("M3:P4").Copy Range("M9"): Range("M9").Value = "Pièces"
' Suivante
Range("M3:P3").Copy Range("M12"): Range("M12").Value = "Suivante"
With Range("M13:P14")
.Borders(xlEdgeLeft).Weight = xlThick
.Borders(xlEdgeTop).Weight = xlThin
.Borders(xlEdgeBottom).Weight = xlThick
.Borders(xlEdgeRight).Weight = xlThick
.Borders(xlInsideVertical).Weight = xlThin
.Borders(xlInsideHorizontal).Weight = xlThin
.Interior.Pattern = xlSolid: .Interior.Color = Cj
End With
' Automatique
Range("M12:P15").Copy Range("M16"): Range("M16").Value = "Automatique"
Range("N17:P17").MergeCells = True: Range("N17").Value = "Suivante"
Range("N18:P18").MergeCells = True: Range("N18").Value = "Descente"
' Titre
With Range("M20:P21")
.MergeCells = True: .Value = "Tris (P)06/2010 MyLzz59"
.Borders(xlEdgeLeft).Weight = xlThick
.Borders(xlEdgeTop).Weight = xlThick
.Borders(xlEdgeBottom).Weight = xlThick
.Borders(xlEdgeRight).Weight = xlThick
.Interior.Pattern = xlSolid: .Interior.Color = Ch
.Select
End With
MsgBox "Pensez à renommer cette feuille ""Tris"" dans VBA" _
+ vbCr + "-MyLzz59-", vbInformation, _
"MeFTris - Création de l'Interface de ""Tris"""
End Sub