Reset
Restores every property of the cDialog to the value it had when the object was created.
Syntax: object.Reset
- object
- required An object expression that evaluates to a cDialog.
Remarks
Reset empties DialogTitle, InitialDir, DefaultExt, FileName and Filter, sets MultiSelect, ReadOnly, NoChangeDir and CreatePrompt to False, and sets OverwritePrompt, PathMustExist, FileMustExist, HideReadOnly and NewDialogStyle to True. These are the starting values listed on the page of the class.
A confirmed ShowOpen or ShowSave leaves its path in FileName, and a confirmed ShowBrowseForFolder leaves the folder in InitialDir. Reset clears both, along with the other properties.
Example
Dim dlg As New cDialog
dlg.DialogTitle = "Pick a file"
dlg.AddFilter "All Files (*.*)", "*.*"
dlg.MultiSelect = True
dlg.OverwritePrompt = False
dlg.Reset
Debug.Print "[" & dlg.DialogTitle & "]" ' []
Debug.Print Len(dlg.Filter) ' 0
Debug.Print dlg.MultiSelect ' False
Debug.Print dlg.OverwritePrompt ' True
See Also
- cDialog class – overview, with the starting values
- FileName property – set by a confirmed Open or Save As dialog
- InitialDir property – set by a confirmed Browse For Folder dialog