How to display Items in ListBox
Hi.
I tried this code. But it doesn't work.
I pasted this code by clicking my listbox1.
Private Sub ListBox1_Click()
On Error Resume Next
For Each cell In Sheet2.Range("DetailInfoAddress")
With ListBox2
.AddItem cell.value
End With
Next cell
End Sub
In my case, "DetailInfoAddress" is the name of one cell in sheet2. Its
value depends
on the item choice of Listbox1. I used the linkedcell property to
connect this two listbox
Here is one example of "DetailInfoAddress" value, Sheet2!$B$2:$B$6.
Could you help me to try this code again? Thank you!
Best Regards
Sam
|