Download Tutorial- PDF File:http://rapidshare.de/files/21379540/SaveFileDialog.pdf.html
Step-By-Step Instructions:
1. From ToolBox ——> Select “Dialogs” Category ——> Click on “SaveFileDialog”
2. In the Properties Window ———> Change the “SaveFileDialog1” to “SaveFileDialog” under (Name)
3. Read the Following Function:
Private Sub SaveFileName(ByVal extStr As String, ByVal ExtNameStr As String)
Dim filename As String
On Error GoTo SaveAsErr
' display the Save dialog
SaveFileDialog.AddExtension = True ‘ This is one of Dialog Properties
SaveFileDialog.DefaultExt = extStr ‘ This is one of Dialog Properties: Ex: { jpg or pdf or doc}
SaveFileDialog.Filter = ExtNameStr + " (*." + extStr + ")|*." + extStr ‘ This is one of Dialog Properties
' Check if yes or Cancel btn is clicked
' get the resulting filename
If SaveFileDialog.ShowDialog = Windows.Forms.DialogResult.Cancel Then
If extStr = "doc" Then
filename = "opt-out." + extStr
ElseIf extStr = "txt" Then
filename = "opt-out." + extStr
End If
Else
filename = SaveFileDialog.FileName
End If
SaveAsErr:
Exit Sub
End Sub


