Problème code demande correction

Bonjour

Je rencontre un problème sur mon projet excel si quelqu'un pourrai corriger mon code car je n'arrive pas faire ce que je veux.

ce que je voudrais c'est que en fonction de ce que je sélectionne dans ma combobox3 cela m'affiche dans ma listbox1 les donner des colonnes "F" "G" "H" "I" "J"

Private Sub ComboBox3_Change()

Dim J As Long

Me.ListBox1.Clear

If Me.ComboBox3.ListIndex = -1 Then Exit Sub

With Sheets("Feuil1")

Set Cel = .Columns("E").Find(what:=Me.ListBox1, LookIn:=xlValues, lookat:=xlWhole)

If Not Cel Is Nothing Then

For J = Cel.Row To Cel.Offset(1, 0).Row - 1

If .Columns("G:J" & J) <> "" Then

Me.ComboBox3.AddItem .Columns("G:J" & J)

End If

Next J

End If

End With

End Sub

Bonjour

Sans fichier

A tester (non testé)

Private Sub ComboBox3_Change()
Dim J As Long
  Me.ListBox1.Clear
  If Me.ComboBox3.ListIndex = -1 Then Exit Sub
  With Sheets("Feuil1")
    Set Cel = .Columns("E").Find(what:=Me.ListBox1, LookIn:=xlValues, lookat:=xlWhole)
    If Not Cel Is Nothing Then
      For J = Cel.Row To Cel.Offset(1, 0).Row - 1
        If .Range("F" & J) <> "" Then
          Me.ListBox1.AddItem .Range("F" & J)
          Me.ListBox1.List(Me.ListBox1.ListCount - 1, 1) = .Range("G" & J)
          Me.ListBox1.List(Me.ListBox1.ListCount - 1, 2) = .Range("H" & J)
          Me.ListBox1.List(Me.ListBox1.ListCount - 1, 3) = .Range("I" & J)
          Me.ListBox1.List(Me.ListBox1.ListCount - 1, 4) = .Range("J" & J)
        End If
      Next J
    End If
  End With
End Sub

désoler je vous le met a disposition tout de suite

j'ai essayer votre code mais cela na rien donner


autant pour moi en faite si votre code fonctionne très bien désoler et merci encore pour votre aide

Maintenant je voudrais que cela m'affiche les différentes dimension en fonction des ma sous catégories ET de mon fournisseur ( détail important) je vous laisse voir mon ficher excel pour mieux comprendre. Car actuellement cela alimente toujours les même dimension pour tout les produit et je ne sais pas comment définir cela.

Bonjour

A vérifier

Parfait c'est exactement cela merci beaucoup et bon week end

Rechercher des sujets similaires à "probleme code demande correction"