Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Clifton Flores   on Mar 25 In MS Office Category.

  
Question Answered By: Uma 1985   on Mar 25

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

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on filedialog for saving text file Or get search suggestion and latest updates.


Tagged: