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

XL 2013 besoin d'aide

eldinal

XLDnaute Nouveau
j'aimerai afficher dans des textbox(userforme nommé modificationarticle) , la liste de données selectionnée dans une listbox(userforme nommé stocktotal)


voici le code d'affichage que j'ai mis qui ne marche pas

Private Sub ListBox1_Click()
ThisWorkbook.Worksheets("Stock total").Activate
Modificationarticle.TextBox1.Value = ThisWorkbook.Worksheets("Temp21").Range("A" & ListBox1.ListIndex + 1).Value
Modificationarticle.TextBox2.Value = ThisWorkbook.Worksheets("Temp21").Range("B" & ListBox1.ListIndex + 1).Value
Modificationarticle.TextBox3.Value = ThisWorkbook.Worksheets("Temp21").Range("C" & ListBox1.ListIndex + 1).Value
Modificationarticle.TextBox4.Value = ThisWorkbook.Worksheets("Temp21").Range("D" & ListBox1.ListIndex + 1).Value
Modificationarticle.TextBox5.Value = ThisWorkbook.Worksheets("Temp21").Range("E" & ListBox1.ListIndex + 1).Value
Modificationarticle.Show
End Sub
 

Pièces jointes

  • Projet de gestion de stock MPR.xlsm
    457 KB · Affichages: 2

eldinal

XLDnaute Nouveau
j'aimerai afficher dans des textbox(userforme nommé modificationarticle) , la liste de données selectionnée dans une listbox(userforme nommé stocktotal)


voici le code d'affichage que j'ai mis qui ne marche pas



VB:
Private Sub ListBox1_Click()

ThisWorkbook.Worksheets("Stock total").Activate

Modificationarticle.TextBox1.Value = ThisWorkbook.Worksheets("Temp21").Range("A" & ListBox1.ListIndex + 1).Value

Modificationarticle.TextBox2.Value = ThisWorkbook.Worksheets("Temp21").Range("B" & ListBox1.ListIndex + 1).Value

Modificationarticle.TextBox3.Value = ThisWorkbook.Worksheets("Temp21").Range("C" & ListBox1.ListIndex + 1).Value

Modificationarticle.TextBox4.Value = ThisWorkbook.Worksheets("Temp21").Range("D" & ListBox1.ListIndex + 1).Value

Modificationarticle.TextBox5.Value = ThisWorkbook.Worksheets("Temp21").Range("E" & ListBox1.ListIndex + 1).Value

Modificationarticle.Show

End Sub
 

Pièces jointes

  • Projet de gestion de stock MPR.xlsm
    454.5 KB · Affichages: 1

Discussions similaires

Réponses
6
Affichages
257
Les cookies sont requis pour utiliser ce site. Vous devez les accepter pour continuer à utiliser le site. En savoir plus…