1 pièce(s) jointe(s)
Remplir TextBox avec une valeur correspondant a une listbox
Bonjour,
j'ai rempli une ListBoxMatiereIPE de la manière suivante:
Code:
1 2 3 4 5
| With UserFormPrix.ComboBoxMatiereIPE
For J = 3 To 5
.AddItem Ws.Range("A" & J)
Next J
End With |
Ensuite je souhaite voir apparaître dans une TextBoxDensiteIPE la valeur de la densité rentrée dans une feuille Excel (colones C célulles 3,4,5)
Je souhaite lorsque je sélectionne une matière dans la ListBoxMatiereIPE qu’apparaisse la densité correspondant a la matière sélectionnée qui se trouve 2 colonnes à coté de la matière (colonne C dans ma table excel)
J'utilise un code qui me renvoie "une incompatibilité de type":
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| Private Sub ComboBoxMatiereIPE_Change()
Dim I As Integer
Dim Ws As Worksheet
Dim Cel As Range
If Me.ComboBoxMatiereIPE.ListIndex = -1 Then Exit Sub
Set Ws = Sheets("Propriétés poutrelles.xls")
TextBoxDensiteIPE = Ws.Cells(Me.ComboBoxMatiereIPE.Column(1), "C").Value
End Sub |
En PJ mon fichier
Saurriez vous m'aider à résoudre ce probleme svp
Cdt Bruno