Save sheet as .TXT out of Workbook
I'd like to save a sheet as a .txt file out of my workbook without closing the actual workbook and keeping the workbook as my .xls format. Thanks for any help! ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Save sheet as .TXT out of Workbook
Use the sheet copy method to copy as a new workbook then do File/Save As on that.
Regards BrianB ================================================== ============== goepf wrote in message ... I'd like to save a sheet as a .txt file out of my workbook without closing the actual workbook and keeping the workbook as my .xls format. Thanks for any help! ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Save sheet as .TXT out of Workbook
Thanks that's what I did. If it helps somebody, here is an example fo code: Dim FileName As String, path As String, DLSfile As String FileName = Windows.Application.ActiveWorkbook.Name path = "DestinationPath" Sheets("toCopy").Select Sheets("toCopy").Copy DLSfile = "DL72112.txt" ActiveWorkbook.SaveAs FileName:=path & DLSfile, fileFormat:=xlText CreateBackup:=False ActiveWindow.Clos ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
All times are GMT +1. The time now is 04:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com