Hello All,
I have got a listbox which lists the files from a network folder. I have set the multiselect property to Extended. What iam trying to do now is display the multiple file names from the listbox. The following is the code which i made but instead of returning the selected items value, the code displays NULL n number of times depending on the itemsSelected.c ount. For example it displays NULL 5 times if i have selected 5 items from the listbox. Please help.....
I have got a listbox which lists the files from a network folder. I have set the multiselect property to Extended. What iam trying to do now is display the multiple file names from the listbox. The following is the code which i made but instead of returning the selected items value, the code displays NULL n number of times depending on the itemsSelected.c ount. For example it displays NULL 5 times if i have selected 5 items from the listbox. Please help.....
Code:
Dim frm As Form, ctl As Control
Dim varItm As Variant
Set frm = Forms!Listing
Set ctl = frm!lstDisplay
For Each varItm In ctl.ItemsSelected
Debug.Print ctl.ItemData(varItm)
Next varItm
Comment