I'm gathering the selected files from a folder into a ListBox, everything is fine as long as I select the files by mouse, but if I use shift+mouse to select multiple rows of files, the last one goes first on the list. Any idea how to correct this would be appreciated.
There are 2 ListBoxes, one with just filenames (lstFiles) the other with path+file names (lstPath).Code:Private Sub cmdBrowse_Click()
Dim sArr() As String
Dim i As Long
comBrowse.Flags = cdlOFNAllowMultiselect + cdlOFNExplorer
comBrowse.ShowOpen
sArr = Split(comBrowse.Filename, Chr(0))
For i = 0 To UBound(sArr())
lstFiles.AddItem sArr(i)
lstPath.AddItem lstFiles.List(0) & "\" & sArr(i)
Next i
lstFiles.RemoveItem 0
lstPath.RemoveItem 0
End Sub 'cmdBrowse_Click()
