Save as dialog box: – The save as dialog box is used to open a save as dialog box by calling the common dialog controls ShowSave method. This method used with name of common dialog control. Syntax of the ShowSave method is –

                <Control Name>.ShowSave

Here control name is the name of common dialog control and ShowSave is a method of common dialog control. Along with the ShowSave method we can also use properties same as open dialog box and its function are exactly same. An example of the ShowSave method is –

    With DLGCommon
        .Filter = "Text Files (*.txt)|*.txt| All Files (*.*)|*.*"
        .InitDir = "C:\My Documents"
        .DialogTitle = "Save File As"
        .ShowSave
    End With
    If DLGCommon.FileName = "" Then
        MsgBox "You Entered No File Name"
    Else
        Open DLGCommon.FileName For Output As #1
    End If
Advertisements