kimiraikkonen
3/16/2008 4:24:00 PM
On Mar 16, 5:09 pm, "John" <i...@nospam.infovis.co.uk> wrote:
> If more than one item are selected, how can I return all of them? is there
> an indexed method that does that?
>
> Thanks
>
> Regards
>
> "kimiraikkonen" <kimiraikkone...@gmail.com> wrote in message
>
> news:44b27c7d-9051-43c6-92ed-9ebaf8d6109b@e6g2000prf.googlegroups.com...
>
> > On Mar 16, 11:18 am, "John" <i...@nospam.infovis.co.uk> wrote:
> >> Hi
>
> >> I have a few questions regarding Listbox;
>
> > Assume your listbox's name is "listbox1".
>
> >> 1. How can I fill Listbox from an access table with multiple columns?
>
> > "listbox1.items.add" depending on your display member and source.
>
> >> 2. How can I return the user selected (highlighted) items in a Listbox
> >> individually?
>
> > "listbox1.selecteditem.tostring"
>
> >> 3. How can I remove user selected (highlighted) items from a Listbox?
>
> > "listbox1.items.remove(listbox1.selecteditem)" or
> > "listbox1.items.removeAt(listbox1.selectedindex)"
>
> >> Thanks
>
> >> Regards
First set listbox's selection mode to "multiSimple" mode then:
For Each items As String In ListBox1.SelectedItems
' Add / insert multi items where you want
Next