Boules (P)03/2010 MyLzz59: le Code Générateur de l'Interface
(ne sert qu'en préliminaire, pour bâtir la feuille)
Sub MeF_Jeu_Boules() 'On Error Resume Next Application.DisplayAlerts = False While Sheets.Count > 1: Sheets(Sheets.Count).Delete: Wend Sheets(1).Activate: Sheets(1).Name = "Boules" With Cells .ColumnWidth = 0: .RowHeight = 0 '.EntireColumn.Hidden = True: .EntireRow.Hidden = True End With With Range("A1:AO34") .ColumnWidth = 2.14: .RowHeight = 14.25 '.EntireRow.Hidden = False: .EntireColumn.Hidden = False .Font.Name = "Comic Sans MS": .Font.Size = 9 .HorizontalAlignment = xlCenter: .VerticalAlignment = xlCenter .Interior.Pattern = xlSolid: .Interior.ColorIndex = 15 End With Application.Goto Reference:="R1C1:R34C41" Rows("31:31").RowHeight = 3: Rows("33:33").RowHeight = 3 With Rows("31:33") .Font.Bold = True: .Interior.Pattern = xlSolid: .Interior.Color = 8388736 End With Rows("34:34").RowHeight = 0.75: Columns("AO:AO").ColumnWidth = 0.08 With ActiveWindow .SplitRow = 33: .SplitColumn = 40: .FreezePanes = True End With LS = xlContinuous: WE = xlMedium: T = 1 With Range("B32:J32") .Merge: .Font.Color = 65535 .Interior.Pattern = xlSolid: .Interior.Color = 16751052 .Select: GoSub SSLine End With With Range("M32:Q32") .Merge: .Font.Color = 65535: .Value = "Pions restants:" .Interior.Pattern = xlSolid: .Interior.Color = 8421631 .HorizontalAlignment = xlRight: .Select: GoSub SSLine End With With Range("V32:Z32") .Merge: .Font.Color = 65535: .Value = "Coups joués:" .Interior.Pattern = xlSolid: .Interior.Color = 8421631 .HorizontalAlignment = xlRight: .Select: GoSub SSLine End With T = 0 With Range("R32:T32") .Merge: .Font.Color = 32768 .Interior.Pattern = xlSolid: .Interior.Color = 16763904 .Select: GoSub SSLine End With With Range("AA32:AC32") .Merge: .Font.Color = 32768 .Interior.Pattern = xlSolid: .Interior.Color = 16763904 .Select: GoSub SSLine End With LS = xlDouble: WE = xlThick: T = 1 With Range("AF32:AM32") .Merge: .Font.Color = 128: .Font.Bold = True: .Value = "Recommencer (Dbl-Click)" .Interior.Pattern = xlSolid: .Interior.Color = 8421631 .Select: GoSub SSLine End With ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True Range("A1").Select Exit Sub SSLine: With Selection .Borders(xlDiagonalDown).LineStyle = xlNone .Borders(xlDiagonalUp).LineStyle = xlNone .Borders(xlInsideVertical).LineStyle = xlNone .Borders(xlInsideHorizontal).LineStyle = xlNone End With With Selection.Borders(xlEdgeLeft) If T Then .LineStyle = LS: .Color = -10092442: .Weight = WE Else .LineStyle = xlNone End With With Selection.Borders(xlEdgeTop) .LineStyle = LS: .Color = -10092442: .Weight = WE End With With Selection.Borders(xlEdgeBottom) .LineStyle = LS: .Color = -10092442: .Weight = WE End With With Selection.Borders(xlEdgeRight) .LineStyle = LS: .Color = -10092442: .Weight = WE 'If T Then .LineStyle = xlNone Else .LineStyle = LS: .Color = -10092442: .Weight = WE End With Return End Sub-MyLzz59-