FileDialog Property

Microsoft Access Visual Basic

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

expression.FileDialog(dialogType)

expression    Required. An expression that returns one of the objects in the Applies To list.

dialogType   Required MsoFileDialogType. The type of file dialog box.

MsoFileDialogType can be one of these MsoFileDialogType constants.
msoFileDialogFilePicker
msoFileDialogFolderPicker
msoFileDialogOpen
msoFileDialogSaveAs

Example

This example displays the Save As dialog box.

Dim dlgSaveAs As FileDialog

Set dlgSaveAs = Application.FileDialog( _
    FileDialogType:=msoFileDialogSaveAs)

dlgSaveAs.Show
		

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

Dim dlgOpen As FileDialog

Set dlgOpen = Application.FileDialog( _
    FileDialogType:=msoFileDialogOpen)

With dlgOpen
    .AllowMultiSelect = True
    .Show
End With