'EXCEL
GetOpenFileName method' - ----------------------------
'This method allows us to deploy the open dialog box (File menu), but not open the file indicated.
'* The method returns us uan string containing the path and file name selected.
'Syntax
'--------
' Object.GetOpenFilename (FileFilter, FilterIndex, Title, ButtonText, Multiselect)
'FileFilter> Opcional.Una Serial specified with file filtering criteria.
'FilterIndex> Opcional.Los index numbers of low default file filtering criteria.
'Title> Optional. The dialogo.si box title is omitted, the title .. show "Open"
'ButtonText> Just for Macintosh
' Multiselect> Optional. If true, you can select multiple filenames
'The argument that determinalo File Filter dialog box displays the file type drop down list.
'* consists of pairs of sets of filter followed by the wildcard file specified.
'* If omitted will default, "All File (*.*),*.*"
'Example
'-------
' FilterIndex argument specifying the file type that appears by default,
'the title of the argument is a text that is displayed in the title bar.
'
' * multiselect if the argument is true, the user can select multiple files (and will be returned in a series) Sub
abreArchivo ()
Filtrox As String Dim
FilterIndex As Integer Dim Title As String Dim
Dim filename As Variant
'Set Filter file list
Filtrox = "Text Files (*. txt), *. txt," & _
"Word (*. doc), *. doc," & _
"Excel (*. xls), *. xls," & _
"Power Point (*. ppt), *. ppt," & _
"All files (*.*),*.*"
'Show all files default
FiltroIndex = 3 title = "Example"
' Get Filename filename = Application.GetOpenFilename
(FileFilter: = Filtrox, FilterIndex: = FiltroIndex, Title: = Title) End Sub