FileDialog Property [Publisher 2003 VBA Language Reference]
Returns a FileDialog object (Microsoft Office 2003 Visual Basic Reference) which represents a single instance of a file dialog box.
expression.FileDialog(Type)
expression Required. An expression that returns one of the objects in the Applies To list.
MsoFileDialogType
MsoFileDialogType can be one of these MsoFileDialogType constants. |
msoFileDialogFilePicker |
msoFileDialogFolderPicker |
msoFileDialogOpen |
msoFileDialogSaveAs |
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
Applies to | Application Object