ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need help saving as tab-delimited file (https://www.excelbanter.com/excel-programming/282330-need-help-saving-tab-delimited-file.html)

monica

Need help saving as tab-delimited file
 
I have been saving a worksheet in my Excel file as comma-
delimited using VBA like this:

ThisWorkbook.SaveAs "FileName", xlCSVWindows

How do I save as tab-delimited text file instead? Isn't
there something to put in place of "xlCSVWindows"?

Thanks in advance!


Tom Ogilvy

Need help saving as tab-delimited file
 
An easy way to find out is to turn on the macro recorder and do you save

ActiveWorkbook.SaveAs Filename:="F:\AAAAA\Book4.txt", _
FileFormat:=xlText, _
CreateBackup:=False

so the answer is xlText

--
Regards,
Tom Ogilvy

"monica" wrote in message
...
I have been saving a worksheet in my Excel file as comma-
delimited using VBA like this:

ThisWorkbook.SaveAs "FileName", xlCSVWindows

How do I save as tab-delimited text file instead? Isn't
there something to put in place of "xlCSVWindows"?

Thanks in advance!





All times are GMT +1. The time now is 11:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com