Open Dialog Box Flag Values

You can customize the Open dialog box by setting the Flag property to the sum of a selection of the following values:

Value Description
1 Causes the Read-Only check box to be initially checked when the dialog box is created. This flag also indicates the state of the Read-Only check box when the dialog box is closed.
2 Causes the Save As dialog box to generate a message box if the selected file already exists. The user must confirm whether to overwrite the file.
4 Hides the Read-Only check box.
8 Forces the dialog box to set the current directory to what it was when the dialog box was opened.
16 Causes the dialog box to display the Help button.
256 Specifies that the common dialog box allows invalid characters in the returned file name.
512 Specifies that the File Name list box allows multiple selections. The user can select more than one file at run time by pressing the SHIFT key and using the UP ARROW and DOWN ARROW keys to select the desired files. When this is done, the File Name property returns a string containing the names of all selected files. The names in the string are delimited by spaces.
1024 Indicates that the extension of the returned file name is different from the extension specified by the DefaultExt property. This flag isn't set if the DefaultExt property is Null, if the extensions match, or if the file has no extension. This flag value can be checked upon closing the dialog box.
2048 Specifies that the user can enter only valid paths. If this flag is set and the user enters an invalid path, a warning message is displayed.
4096 Specifies that the user can enter only names of existing files in the File Name text box. If this flag is set and the user enters an invalid file name, a warning is displayed. This flag automatically sets the 2048 flag.
8192 Specifies that the dialog box prompts the user to create a file that doesn't currently exist. This flag automatically sets the 4096 and 2048 flags.
16384 Specifies that sharing violation errors will be ignored.
32768 Specifies using the Windows 95 Explorer Open A File dialog box template. (Windows 95 only.)
524288 Use the Explorer Open A File dialog box template. Common dialogs that use this flag do not work under Windows NT using the Windows 95 shell.
1048576 Do not dereference shell links (also known as shortcuts). By default, choosing a shell link causes it to be dereferenced by the shell.
1048576 Do not dereference shortcuts (shell links). By default, choosing a shortcut causes it to be dereferenced by the shell. (Windows 95 only.)
2097152 Allows the user to use long file names. (Windows 95 only.)