Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

Application.FileDialog Property (Word)

Returns a FileDialog object which represents a single instance of a file dialog box.

expression .FileDialog(FileDialogType)

expression Required. A variable that represents an Application object.

Parameters

Name

Required/Optional

Data Type

Description

FileDialogType

Required

MsoFileDialogType

The type of dialog.

This example displays the Save As dialog box.

Sub ShowSaveAsDialog() 
 Dim dlgSaveAs As FileDialog 
 Set dlgSaveAs = Application.FileDialog( _ 
 FileDialogType:=msoFileDialogSaveAs) 
 dlgSaveAs.Show 
End Sub

This example displays the Open dialog box and allows a user to select multiple files to open.

Sub ShowFileDialog() 
 Dim dlgOpen As FileDialog 
 Set dlgOpen = Application.FileDialog( _ 
 FileDialogType:=msoFileDialogOpen) 
 With dlgOpen 
 .AllowMultiSelect = True 
 .Show 
 End With 
End Sub
Show:
© 2015 Microsoft