Bug listbox lors de l'ouverture du fichier excel.
Bonjour, je rencontre un problème lors de l'ouverture de mon fichier excel.
Comme dit dans le titre à chaque ouverture je doit effectuer un débogage via VBA concernant une listbox.
Cela affiche : Erreur d’exécution '424' Objet requis.
Pouvez-vous me dire de quoi cela peut-il venir ?
Voici un extrais du code qui coince en question :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| Private Sub ListBox1_Click()
ListBox2.ListFillRange = ListBox1.Value
ListBox2.ListIndex = 0
ListBox1.IntegralHeight = False
'ListBox1.Width = 150
'ListBox1.Left = 650
'ListBox1.Height = 125
ListBox2.IntegralHeight = False
'ListBox2.Width = 500
'ListBox2.Left = 650
'ListBox2.Height = 350
For j = 0 To 1
Cells(500, j + 1).End(xlUp).Offset(1, 0) = "-"
Next j
For j = 2 To 2
Cells(500, j + 1).End(xlUp).Offset(1, 0) = Cells(2, 20)
Next j
For j = 3 To 4
Cells(500, j + 1).End(xlUp).Offset(1, 0) = "-"
Next j
End Sub |