Bonjour,
J'ai réalisé un code vba afin de mettre en page l'ensemble des feuilles de mon fichier Excel.
Pourriez-vous m'indiquer d'où viendrai mon erreur ?
Vous remerciant par avance.
Sub Titres()
For i = i To Worksheets.Count
Sheets(i).Name.Select
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Cells.EntireColumn.AutoFit
Cells.EntireRow.AutoFit
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent1
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Font.Bold = True
Next i
End Sub