Bonjour Namco, bonjour le forum,
Bizarre ce :
With Sheets("Feuil1").Activate
Si tu supprimes le .Activate ton code serait :
Dim DernLigneI As Long
Dim i As Integer
With Sheets("Feuil1")
DernLigneI = .Range("X65536").End(xlUp).Row
For i = 2 To DernLigneI
ComboBox5.AddItem .Cells(i, 24)
Next
End With
avec un point devant Range et devant Cells.
J'écrirais plutôt dans le composant UserForm2 :
Private Sub UserForm_Initialize()
Dim O As Worksheet
Dim DernLigneI As Long
Dim i As Integer
Set O = Worksheets("Feuil1")
DernLigneI = O.Range("X65536").End(xlUp).Row
For i = 2 To DernLigneI
ComboBox1.AddItem O.Cells(i, 24)
Next
End Sub