Re,
Après avoir tester cela ne fonctionne pas je te met mon code juste en dessous peux tu adapter ton code au mien stp
Sheets("Autocom2").Select
'ActiveSheet.Range("B5:Y11").Select
'With Selection
' .ColumnWidth = .ColumnWidth * 4
'.HorizontalAlignment = xlCenter
'.VerticalAlignment = xlCenter
'.EntireColumn.AutoFit
'End With
For Each h In Range("B5:Y11")
With h
.Select
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.EntireColumn.AutoFit
End With
Call CountCharactersByLine(h.Value)
'MsgBox (h.Address & vbCrLf & h.Value & vbCrLf & h.Comment.Text)
'MsgBox (h.Address & vbCrLf & h.Value & vbrlf & ActiveSheet.Name)
'MsgBox (h.Value & vbCrLf & out)
Next
Je ne veux pas à la fin quand j'appuie sur mon bouton qu'il me donne le nombre de caractère je veux juste qu'il le calcul intérieurement et après rajouter le code de l'autofit , qu'il face case par case la recherche de la plus grande ligne et après faire l'autofit en fonction de celle-ci de la cellul B5 à Y11
Merci de ton aide
Kaëlig