Digitborn.com
Active Member
- Joined
- Apr 3, 2007
- Messages
- 353
Hi,
I have this simple code:
The problem is that I got an empty header of ListBox1 (looking like i'm using RowSource Property). This comes from the line ListBox1.AddItem. If I don't lose this line, i can't add items with ListBox.List property. How can I remove or make not appear this empty header?
I have this simple code:
Code:
With Sheets("Sheet1")
For Each Rw In .Range("A2:A" & .Range("A" & Rows.Count).End(xlUp).Row)
If ComboBox1.Text = Rw.Value Then
ListBox1.AddItem
ListBox1.List(i, 0) = Rw.Offset(0, 1).Value
ListBox1.List(i, 1) = Rw.Offset(0, 2).Value
ListBox1.List(i, 2) = Rw.Offset(0, 3).Value
i = i + 1
End If
Next Rw
End With
The problem is that I got an empty header of ListBox1 (looking like i'm using RowSource Property). This comes from the line ListBox1.AddItem. If I don't lose this line, i can't add items with ListBox.List property. How can I remove or make not appear this empty header?