First you add a FileSaveDialog object to your form by dragging and dropping from the toolbox. After you have done that, select the control and browse the properties. Each property has a description that explains what it is for. To prompt the user for a filename you do
If SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
MsgBox("you selected " & SaveFileDialog1.FileName)
You must search using google before posting any question. Following is the code to save text file
Dim svFileDialog As New SaveFileDialog
svFileDialog.Filter = "Text file|*.txt"
svFileDialog.Title = "Save text file"
If Not svFileDialog.FileName = "" Then
System.IO.File.WriteAllText(svFileDialog.FileName, "your Text")