I am a newbie. (pardon my English)
I have created an invoice for myself, there is a view user-form which initialize with this code:
Private Sub UserForm_Initialize()
'Populate listbox with unique invoice numbers from sheet "Invoice data"
Dim Test As New Collection
Dim rng As Variant
Dim Value As Variant
'Identify range
rng = Sheets("Invoice data").Range("A2:A" & _
Sheets("Invoice data").Columns("A").Find("*", _
SearchOrder:=xlRows, SearchDirection:=xlPrevious, _
LookIn:=xlValues).Row)
'Filter unique values
On Error Resume Next
For Each Value In rng
If Len(Value) > 0 Then Test.Add Value, CStr(Value)
Next Value
On Error GoTo 0
For Each Value In Test
ListBox1.AddItem Value
Next Value
ListBox1.ListIndex = 0
End Sub
In this user-form I have a list-box to show the id number in the sheets ("invoice data") Range is column "A".
I need to convert this list box into a two column box, the first column should show "A" and next column should show "C".
Can you guide me?
Thanks in advance.