April 2006
Beginner
1114 pages
98h 16m
English
Application.FileDialog (MsoFileDialogType)
Returns the FileDialog object.
|
Argument |
Description |
Settings |
|---|---|---|
|
|
Determines which Excel dialog to return |
|
The following code displays the file picker dialog box and lets the user select a text file to open in Notepad:
Sub TestFileDialog( )
Dim fname As String
With Application.FileDialog(msoFileDialogFilePicker)
.AllowMultiSelect = False
.Filters.Add "Text files (*.txt)", "*.txt", 1
.FilterIndex = 1
.Title = "Open text file"
If .Show = True Then _
Shell "notepad.exe " & .SelectedItems(1)
End With
End SubRead now
Unlock full access