Private Sub UserForm_Initialize()
Dim marges#
Static n As Byte
With ListBox1
.IntegralHeight = False: .Height = 0: .IntegralHeight = True: marges = .Height 'aucune ligne affichée
.IntegralHeight = False: .Height = marges + .Font.Size '1 ligne affichée
DoEvents
.IntegralHeight = True
.Height = (.Height - marges) * ([F10] + 1) + marges + 1 'toutes les lignes affichées
DoEvents
Me.Height = 2 * .Top + .Height + 45
If n = 0 Then n = 1: UserForm_Initialize: n = 0
End With
End Sub