Bonjour,
J'ai fait ce code à des fins d'habillage d'une cellule en vba sous 2007 :
une fois sur 2003, je n'ai pas pu faire marcher le code surtout pour .tintandshade, .colorindex ??
Merci de votre aide.
J'ai fait ce code à des fins d'habillage d'une cellule en vba sous 2007 :
Range("A1:E1").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
.Merge
End With
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
'.LineStyle = xlContinuous
.ColorIndex = 0
'.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
'.LineStyle = xlContinuous
.ColorIndex = 0
'.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
'.LineStyle = xlContinuous
.ColorIndex = 0
'.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
'.LineStyle = xlContinuous
.ColorIndex = 0
'.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
'.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
'.LineStyle = xlContinuous
.ColorIndex = 0
'.TintAndShade = 0
.Weight = xlThin
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Range("A1:E1").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535
'.TintAndShade = 0
.PatternTintAndShade = 0
End With
Cells(1, 1).Font.Bold = True
Cells(2, 1) = "Chemin de l'enregistrement": Cells(2, 2) = "Nom du fichier": Cells(2, 3) = "Crée le "
Cells(2, 4) = "Modifié le ": Cells(2, 5) = "CEA"
Range("A2:E2").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
'.TintAndShade = -4.99893185216834E-02
.PatternTintAndShade = 0
End With
une fois sur 2003, je n'ai pas pu faire marcher le code surtout pour .tintandshade, .colorindex ??
Merci de votre aide.