PDA

View Full Version : msoFileDialogFilePicker Items Order



kioric
01-31-2016, 08:06 PM
I've the following code to select mutiple images to insert to a document, I will like to choose the order using the mouse. I don't know if its possible in the same msoFileDialogFilePicker dialog or bringing the selected images to a new dialog using a different command. From tests with the current command it use the same order as displayed withe the selected items.

Sub Main()

Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFilePicker)
Dim vrtSelectedItem As Variant
With fd
If .Show = -1 Then

For Each vrtSelectedItem In .SelectedItems

MsgBox "The path is: " & vrtSelectedItem

Next vrtSelectedItem
Else
End If
End With
Set fd = Nothing
End Sub

gmayor
01-31-2016, 09:54 PM
You will need a userform with two list boxes and a raft of code to sort the order - see http://www.gmayor.com/photo_gallery_template.html