Don't use FileDialog. Use GetSaveAsFilename to get the path & name for the new
file. You can set the filter property on GetSaveAsFilename. Then use Save or
SaveAs or SaveAsCopy to actually write the data to disk. For example:
Sub ZZZZ()
Dim fName
Do
fName = Application.GetSaveAsFilename(fileFilter:="Text Files (*.txt),
*.txt")
Loop Until fName <> False
ActiveWorkbook.SaveAs Filename:=fName, FileFormat:=xlTextMSDOS,
CreateBackup:=False
End Sub