I've got the following code for multi-file selection:
Everything works fine except when I select a different filter. If I select either *.xls or *.* from the list of filters, the folder/file list goes blank. I can get it to refresh the list if I click on one of the system folders listed on the left of the dialog box but that is the only way. Has anyone seen this? Any suggestions?
Thanks
Code:
Dim localFiles() As String
Dim localFile As String
Dim listForEnumerator As ArrayList
Dim OFD As New OpenFileDialog
listForEnumerator = New ArrayList()
Try
With OFD
.Filter = "Excel Files (*.xls)|*.xls|All files (*.*)|*.*"
.Multiselect = True
If .ShowDialog = DialogResult.OK Then localFiles = .FileNames
If IsNothing(localFiles) Then Exit Sub
For Each localFile In localFiles
listForEnumerator.Add(localFile)
Next
End With
Catch
End Try
Everything works fine except when I select a different filter. If I select either *.xls or *.* from the list of filters, the folder/file list goes blank. I can get it to refresh the list if I click on one of the system folders listed on the left of the dialog box but that is the only way. Has anyone seen this? Any suggestions?
Thanks