Hi, I currently have the following code to save an Excel file as a .txt file.
The problem is that when the .txt file is saved, it overrides the excel file.
How can I save the .txt file so that is separate from the excel file?
Thanks
Code:
Sub Macro1()
'Saves the Activesheet to the Desktop as a text file with a different extension
Dim newFile As String, fName As String, gName, fileSaveName
gName = "FGM_"
newFile = gName & Format$(Date, "dd-mm-yyyy")
fileSaveName = Application.GetSaveAsFilename(newFile, "Text (MS-DOS) (*.txt), *.txt")
ThisWorkbook.SaveAs fileSaveName, xlTextMSDOS
End Sub
The problem is that when the .txt file is saved, it overrides the excel file.
How can I save the .txt file so that is separate from the excel file?
Thanks