mardi 19 novembre 2019

How To Display Multiple Columns In Combo Box

on list "ListPurchInv" I have several columns - in J column, is remaining amount. In D column in document no. I want to AddItem into ComboBox from column D, must fulfil condition, that remaining amount is not 0.

Now I can visible only remaining amount.

Private Sub CheckBox1_Click()

Me.Label4.Visible = Me.CheckBox1
Me.cb_SelInvToPay.Visible = Me.CheckBox1

Dim c As Range

With Worksheets("ListPurchInv")
    For Each c In .Range("K2", .Range("J" & Rows.Count).End(xlUp))
        If c.Value <> 0 Then cb_SelInvToPay.AddItem c.Value
    Next c
End With

End Sub

Aucun commentaire:

Enregistrer un commentaire