Hi Folks,
Below is some code that I've been fiddling with and trying to get a list box to take a group of selected files.
It don't seem to want to work and keep getting errors.
Sub MoveSelectedFiles()
FileListBox.ListIndex = 0
ListBox.Clear
For i = 0 To FileListBox.ListCount - 1
FileListBox.ListIndex = i
If FileListBox.Selected = True Then
ListBox.AddItem FileListBox.Filename
End If
Next i
End Sub
Can you please help?
Thanks in advance,
Andrew.
Below is some code that I've been fiddling with and trying to get a list box to take a group of selected files.
It don't seem to want to work and keep getting errors.
Sub MoveSelectedFiles()
FileListBox.ListIndex = 0
ListBox.Clear
For i = 0 To FileListBox.ListCount - 1
FileListBox.ListIndex = i
If FileListBox.Selected = True Then
ListBox.AddItem FileListBox.Filename
End If
Next i
End Sub
Can you please help?
Thanks in advance,
Andrew.