Alimenter une Combobox avec une plage variable et dupliquer avec CheckBox

Bonjour le forum, bonjour les intervenants,

Je souhaite alimenter la ComboBox4 suivant une plage variable (sans doublons) (colonne C dans l’exemple joint), qui dépend de la Ref-Client de la cellule active et pouvoir dupliquer les listes de choix si CheckBox2 cochée.

Je joins un fichier test.

Merci les intervenants pour votre aide.

Bon dimanche le forum.

Bonsoir le forum, les intervenants,

J'ai retravaillé un peu mon code, mais je bloque sur une partie.

Si un intervenant peut regarder mon code, je sèche, je n'arrive pas a imbriquer les deux conditions.

Private Sub CommandButton1_Click()

If Me.ComboBox1 <> "" And Me.ComboBox2 <> "" Then

ActiveCell = UCase(Me.ComboBox1)

ActiveCell.Offset(, 1) = Me.ComboBox2

ActiveCell.Offset(, 2) = Me.ComboBox3

ActiveCell.Offset(, 3) = CDbl(Me.TextBox1)

If CheckBox2 = True Then

ref = ActiveCell.Offset(0, -1)

ref2 = ActiveCell.Offset(-1, -2)

With Sheets("Saisie")

Range("E" & ActiveCell.Row & ":H" & ActiveCell.Row).Copy

For i = 2 To .Range("D" & Rows.Count).End(xlUp).Row

For j = 2 To .Range("C" & Rows.Count).End(xlUp).Row

If .Range("D" & i) = ref Then

If .Range("C" & j) = ref2 Then

Range("E" & j).PasteSpecial xlPasteAll

End If

Range("E" & i).PasteSpecial xlPasteAll

End If

Next j

Next i

Application.CutCopyMode = False

End With

End If

Unload Me

Else

MsgBox "Incomplet!!!!"

Exit Sub

End If

End Sub

Je vous remercie.

Rechercher des sujets similaires à "alimenter combobox plage variable dupliquer checkbox"