Formulaire avec sélection de champs
Résolu
senecartour
Messages postés
391
Statut
Membre
-
senecartour Messages postés 391 Statut Membre -
senecartour Messages postés 391 Statut Membre -
Bonjour,
J'ai écris un code pour afficher les données des champs dans mon UserForm, sauf qu'en exécutant ma macro, j'ai l'erreur "sur LisIndex"
Ci-joint le fichier: https://www.cjoint.com/?DCExHVOeHUq
Private Sub UserForm_Initialize()
ComboBox1.RowSource = ("Ref")
End Sub
Private Sub ComboBox1_Change()
TextBox1 = ComboBox1.List(ComboBox1.ListIndex, 1)
TextBox2 = ComboBox1.List(ComboBox1.ListIndex, 2)
TextBox3 = ComboBox1.List(ComboBox1.ListIndex, 3)
End Sub
Private Sub CommandButton1_Click()
Point = ComboBox1.ListIndex + 1
TextBox1 = Range("Matrice").Cells(Point, 1)
TextBox2 = Range("Matrice").Cells(Point, 2)
TextBox3 = Range("Matrice").Cells(Point, 3)
End Sub
1- J'ai bien fait la liste déroulante
2- I'ai affecté la valeur des textBox avec la listIndex
Mais la Macro ne focntionne pas!
Existerait-il un détails qui m'échappe?
Merci d'avance et désolé encore!
--
Partager son savoir est las meilleure façon d'apprendre!
J'ai écris un code pour afficher les données des champs dans mon UserForm, sauf qu'en exécutant ma macro, j'ai l'erreur "sur LisIndex"
Ci-joint le fichier: https://www.cjoint.com/?DCExHVOeHUq
Private Sub UserForm_Initialize()
ComboBox1.RowSource = ("Ref")
End Sub
Private Sub ComboBox1_Change()
TextBox1 = ComboBox1.List(ComboBox1.ListIndex, 1)
TextBox2 = ComboBox1.List(ComboBox1.ListIndex, 2)
TextBox3 = ComboBox1.List(ComboBox1.ListIndex, 3)
End Sub
Private Sub CommandButton1_Click()
Point = ComboBox1.ListIndex + 1
TextBox1 = Range("Matrice").Cells(Point, 1)
TextBox2 = Range("Matrice").Cells(Point, 2)
TextBox3 = Range("Matrice").Cells(Point, 3)
End Sub
1- J'ai bien fait la liste déroulante
2- I'ai affecté la valeur des textBox avec la listIndex
Mais la Macro ne focntionne pas!
Existerait-il un détails qui m'échappe?
Merci d'avance et désolé encore!
--
Partager son savoir est las meilleure façon d'apprendre!