Bonjour, et encore une autre fois je m'adresse a vous, aussi a votre aide,
On m'as proposé un code pour fixer la hauteur des lignes aussi la largeur des colonnes, mais ces critères ne s'applique pas a la feuille concernée (effet), mais plutôt a une autre feuille (facture)
Merci de votre aide, voici le code
On m'as proposé un code pour fixer la hauteur des lignes aussi la largeur des colonnes, mais ces critères ne s'applique pas a la feuille concernée (effet), mais plutôt a une autre feuille (facture)
Merci de votre aide, voici le code
Code:
Private Sub Workbook_Open()
Dim x As Byte
With Sheets("FACTURE") 'à adapter à ton cas
With .Range("A18:O65536")
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlTop
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
For x = 1 To 15
Select Case x
Case 1, 10, 11, 12, 14, 15
.Columns(x).ColumnWidth = 9
Case 2
.Columns(x).ColumnWidth = 10
Case 3
.Columns(x).ColumnWidth = 18
Case 4 To 7
.Columns(x).ColumnWidth = 11
Case 8, 9, 13
.Columns(x).ColumnWidth = 6
End Select
Next x
End With
With Sheets("EFFET") 'à adapter à ton cas
Columns("A:A").ColumnWidth = 36
Columns("B:B").ColumnWidth = 0.5
Columns("C:C").ColumnWidth = 19.57
Columns("D:D").ColumnWidth = 11.71
Columns("E:E").ColumnWidth = 0.5
Columns("F:F").ColumnWidth = 27
Rows("1:1").RowHeight = 79.5
Rows("2:2").RowHeight = 22.25
Rows("3:3").RowHeight = 3.25
Rows("4:4").RowHeight = 22
Rows("5:5").RowHeight = 3
Rows("6:6").RowHeight = 6.5
Rows("7:7").RowHeight = 5
Rows("8:8").RowHeight = 8
Rows("9:9").RowHeight = 3
Rows("10:10").RowHeight = 33.75
Rows("11:11").RowHeight = 3
Rows("12:12").RowHeight = 12
Rows("13:13").RowHeight = 6.5
Rows("14:14").RowHeight = 12.75
Rows("15:15").RowHeight = 38.25
End With