1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| Private Sub Grille_Formatage()
Dim i As Long
With GrilleMSH
.ColHeader(0) = (flexColHeaderOn)
.ColHeaderCaption(0, 1) = "Id_Transport"
.ColHeaderCaption(0, 2) = "Type_Transport"
.ColHeaderCaption(0, 3) = "Lieu"
.ColHeader(1) = (flexColHeaderOn)
.ColHeaderCaption(1, 0) = "titre"
.ColHeaderCaption(1, 1) = "px"
' Indentation de la bande 1 (les ouvrages)
.BandIndent(1) = 3
.BackColorIndent(1) = vbYellow
'Alignement des titres de colonnes pour la bande 0
For i = 0 To .Cols - 1
.ColAlignmentHeader(0, i) = 4
Next
'Alignement des titres de colonnes pour la bande 1
For i = 0 To .Cols - (.BandIndent(1) + 1)
.ColAlignmentHeader(1, i) = 4
.ColAlignmentBand(0, i) = 9
.ColAlignmentBand(1, i) = 9
Next
'Définition de la largeur des colonnes première bande (0)
.ColWidth(0, 0) = 500
.ColWidth(1, 0) = 600
.ColWidth(2, 0) = 1500
'Définition de la largeur des colonnes seconde bande (1)
.ColWidth(0, 1) = 1000
.ColWidth(1, 1) = 1000
.ExpandAll
.Col = 1
.Row = 1
End With
End Sub |
Partager