how would you get the information for all of the selected items in a filelist box
for example
the user selects three items and you need to add all of their names them to a list box
Printable View
how would you get the information for all of the selected items in a filelist box
for example
the user selects three items and you need to add all of their names them to a list box
Add a listbox, a filelist box, and a command button. Turn MultiSelect to 1-Simple and enjoy.
VB Code:
Option Explicit Private Sub Command1_Click() Dim f% For f = 0 To File1.ListCount - 1 If File1.Selected(f) = True Then List1.AddItem File1.List(f) End If Next f End Sub
VB Code:
Dim i As Integer For i = 0 To File1.ListCount - 1 If File1.Selected(i) = True Then MsgBox File1.List(i) End If Next