Format Date dd/mm/yy hh:ss
Bonsoir,
J'ai la macro suivante qui fait une petite mise en page:
Code:
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
|
Sub Macro_0_miseEnPage()
With Sheets("Sheet n°1").PageSetup
.Orientation = xlLandscape
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(1.2)
.BottomMargin = Application.InchesToPoints(1.2)
.HeaderMargin = Application.InchesToPoints(0.2)
.FooterMargin = Application.InchesToPoints(0.2)
End With
With Sheets("Sheet n°1")
.Columns("A").ColumnWidth = 9
.Columns("A").Font.Size = 9
.Columns("B").ColumnWidth = 5.7
.Columns("B").Font.Size = 9
.Columns("C").ColumnWidth = 29
.Columns("C").Font.Size = 9
.Columns("D").ColumnWidth = 12
.Columns("D").Font.Size = 9
.Columns("D").Format ("dd/mm/yy hh:mm")
.Columns("E").ColumnWidth = 10
.Columns("E").Font.Size = 9
.Columns("F").ColumnWidth = 10
.Columns("F").Font.Size = 9
.Columns("G").ColumnWidth = 18
.Columns("G").Font.Size = 9
.Columns("H").ColumnWidth = 39.5
.Columns("H").Font.Size = 9
End With
End Sub |
Or j'ai un soucis au niveau de la ligne en rouge.
Je voudrai que la colonne D soit au format dd/mm/yy hh:ss.
Actuellement, elle est au format dd/mm/yy.
Lorsque j'exécute la macro, j'ai le message d'erreur:
Citation:
Erreur d'exécution '438':
Propriété ou méthode non gérée par cet objet
Et bien entendu, c'est la ligne en rouge qui bug.
Savez-vous comment je peux corriger ceci?
Merci d'avance à vous!