Afficher un message
Vieux 16/04/2006, 00h15   #2 (permalink)
gex1403
XLDnaute Occasionel
 
Date d'inscription: novembre 2005
Localisation: chateaudun
Version Excel : Excel 2000 (PC)
Messages: 153
Par défaut Re:Remplir des listbox suite à un combobox

Salut Luc, adaptes ce code a ton fichier

WS etant le nom de ta feuille ou tu veux recuperer les données

Private Sub ComboBox1_Click()
If Me.ComboBox1.ListIndex = -1 Then Exit Sub 'ON sort si pas de sélection

TextBox1 = WS.Range('B' & Me.ComboBox1.ListIndex + 2) 'On alimente les données correspondant à la ligne
TextBox2.Value = WS.Range('c' & Me.ComboBox1.ListIndex + 2) 'On alimente les données correspondant à la ligne
TextBox3.Value = WS.Range('d' & Me.ComboBox1.ListIndex + 2)
TextBox4.Value = WS.Range('e' & Me.ComboBox1.ListIndex + 2)
TextBox5.Value = WS.Range('f' & Me.ComboBox1.ListIndex + 2)

With Me

End With
End Sub

@micalement
__________________
GEX 1403
gex1403 est déconnecté   Réponse avec citation