Application.FileDialog Property
Returns a FileDialog object representing an instance of the file dialog.
Syntax
expression.FileDialog(fileDialogType)
expression A variable that represents an Application object.
Parameters
| Name | Required/Optional | Data Type | Description |
|---|---|---|---|
| fileDialogType | Required | MsoFileDialogType | The type of file dialog. |
Remarks
| MsoFileDialogType can be one of these MsoFileDialogType constants. |
| msoFileDialogFilePicker. Allows user to select a file. |
| msoFileDialogFolderPicker. Allows user to select a folder. |
| msoFileDialogOpen. Allows user to open a file. |
| msoFileDialogSaveAs. Allows user to save a file. |
Example
In this example, Microsoft Excel opens the file dialog allowing the user to select one or more files. Once these files are selected, Excel displays the path for each file in a separate message.
| Visual Basic for Applications |
|---|
|