Ceci est une page optimisée pour les mobiles. Cliquez sur ce texte pour afficher la vraie page.

probleme avec listbox msg d'erreur

  • Initiateur de la discussion Initiateur de la discussion damien
  • Date de début Date de début

Boostez vos compétences Excel avec notre communauté !

Rejoignez Excel Downloads, le rendez-vous des passionnés où l'entraide fait la force. Apprenez, échangez, progressez – et tout ça gratuitement ! 👉 Inscrivez-vous maintenant !

D

damien

Guest
rebonjour à tous
voici ma macro

Private Sub UserForm_Initialize()
TheMatch = UserForm1.ComboBox1
thematch1 = UserForm1.ComboBox2
thematch2 = UserForm1.Label3
thematch3 = UserForm1.Label4
TheMatch4 = UserForm1.Label8
TheMatch5 = UserForm1.Label10
Label2 = TheMatch
Label4 = thematch1
Label7 = thematch2
Label8 = thematch3
Label10 = TheMatch4
Label12 = TheMatch5
Dim C As Range
Dim x, a As Integer

ListBox1.Clear
Sheets('BASE PECHE').Activate
ListBox1.ColumnCount = 20
ListBox1.ColumnWidths = '100;110;110;110;180;120;110;120;100;320;12'
ListBox1.ColumnHeads = True
x = 0
For Each C In Range('f16:r' & Range('A65536').End(xlUp).Row)
If C = Label2 Then
a = C.Row
ListBox1.AddItem
ListBox1.List(x, 0) = Cells(a, 1).Text

ListBox1.List(x, 1) = Cells(a, 3).Text
ListBox1.List(x, 2) = Cells(a, 4).Text
ListBox1.List(x, 3) = Cells(a, 11).Text
ListBox1.List(x, 4) = Cells(a, 12).Text & ' zone ciem ' & Cells(a, 13).Text
ListBox1.List(x, 5) = Cells(a, 14).Text
ListBox1.List(x, 6) = Cells(a, 15).Text
ListBox1.List(x, 7) = Cells(a, 16).Text
ListBox1.List(x, 8) = Cells(a, 17).Text
ListBox1.List(x, 9) = Cells(a, 18).Text
ListBox1.List(x, 10) = Cells(a, 19).Text


x = x + 1
End If
Next C
End Sub
mes probleme les entetes ne s'affiche et si je rejoute la derniere ligne ' ListBox1.List(x, 10) = Cells(a, 19).Text' ça ne marche plus
erreur d'exécution '380':
impossible de définir la propriété list.valeur de propriété non valide

merci dam
 
- Navigue sans publicité
- Accède à Cléa, notre assistante IA experte Excel... et pas que...
- Profite de fonctionnalités exclusives
Ton soutien permet à Excel Downloads de rester 100% gratuit et de continuer à rassembler les passionnés d'Excel.
Je deviens Supporter XLD

Discussions similaires

Réponses
68
Affichages
8 K
Réponses
2
Affichages
999
Réponses
7
Affichages
834
Les cookies sont requis pour utiliser ce site. Vous devez les accepter pour continuer à utiliser le site. En savoir plus…