GetFiles
Previous  Next

Returns an array of strings with the file names (and paths) that the user chose.
Syntax: GetFiles As String()

Example:
'odEX is an OpenDialogEx object.
Sub Globals
      Dim files(0) 'Creates an empty array that will be later filled.
End Sub

Sub App_Start
      Form1.Show
      odEX.New1
      odEX.MultiSelect = True
      odEX.InitialDirectory = "%USERPROFILE%\My Documents"
      odEX.Filter = "Word Files|*.doc"
      odEX.Title = "Choose your files"
      If odEX.Show <> cCancel Then 'Make sure the user didn't press the Cancel button.
            files() = odEX.GetFiles
            For i = 0 To ArrayLen(files())-1
                  Msgbox(files(i))
            Next
      End If
End Sub