Поделиться через


Application.FileDialog Property (Publisher)

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

Syntax

expression .FileDialog(Type)

expression A variable that represents a Application object.

Parameters

Name

Required/Optional

Data Type

Description

Type

Required

MsoFileDialogType

The type of dialog box.

Return Value

FileDialog

Remarks

The Type parmater can be one of the MsoFileDialogType constants declared in the Microsoft Office type library.

Example

This example displays the Save As dialog box and stores the file name specified by the user.

Sub ShowSaveAsDialog() 
 Dim dlgSaveAs As FileDialog 
 Dim strFile As String 
 
 Set dlgSaveAs = Application.FileDialog( _ 
 Type:=msoFileDialogSaveAs) 
 dlgSaveAs.Show 
 strFile = dlgSaveAs.SelectedItems(1) 
End Sub

See Also

Concepts

Application Object

Application Object Members