Hey y'all,
I've been reading and reading and I can't get this to work. I want to
select multiple files from a dialog and then do stuff to them. Here's
the code I am using:
Sub Command1_Click()
Set objDialog = CreateObject("UserAccounts.CommonDialog")
objDialog.Filename = ""
objDialog.Filter = "All Files|*.*"
objDialog.Flags = &H200 + &H80000 + &H200000
objDialog.ShowOpen
FileNames = Split(objDialog.Filename, vbNullChar)
MsgBox FileNames(0)
MsgBox FileNames(1)
End Sub
Result: After running this and selecting two files, FileNames(0)
contains the path and I get an error at MsgBox FileNames(1) saying it
is out of range. Suggestions?
Lost and Hopeless,
Drew