Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a worksheet in a workbook that I would like to export out as a text
file and not affect the workbook, and name the text file to save as. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
By hand?
File - Save As Under "Save as type:" choose Text (Tab Delimited) or CSV (Comma Delimited) ....or from within a VBA event? ThisWorkbook.SaveAs Filename:="MyText.txt", FileFormat:=xlTextWindows "Slinger" wrote in message ... I have a worksheet in a workbook that I would like to export out as a text file and not affect the workbook, and name the text file to save as. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to automate the task by using a button to do the write to a file
- pretty much a newbie when it comes to VBA "JPW" wrote: By hand? File - Save As Under "Save as type:" choose Text (Tab Delimited) or CSV (Comma Delimited) ....or from within a VBA event? ThisWorkbook.SaveAs Filename:="MyText.txt", FileFormat:=xlTextWindows "Slinger" wrote in message ... I have a worksheet in a workbook that I would like to export out as a text file and not affect the workbook, and name the text file to save as. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Double-click on ThisWorkbook in your VBA Project and add a sub with the line
I gave you below. For example: Public Sub SaveAsTXT() ThisWorkbook.SaveAs Filename:="MyText.txt", FileFormat:=xlTextWindows End Sub Then assign this macro to the button you want from within your workbook. You can assign macros to pictures, this would be the simplest way. Right-click your image and choose "Assign Macro," then pick your SaveAsTXT macro from the list. "Slinjger" wrote in message ... I would like to automate the task by using a button to do the write to a file - pretty much a newbie when it comes to VBA "JPW" wrote: By hand? File - Save As Under "Save as type:" choose Text (Tab Delimited) or CSV (Comma Delimited) ....or from within a VBA event? ThisWorkbook.SaveAs Filename:="MyText.txt", FileFormat:=xlTextWindows "Slinger" wrote in message ... I have a worksheet in a workbook that I would like to export out as a text file and not affect the workbook, and name the text file to save as. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not sure I understand the question.
All you have to do is select File, Save as, then choose .CSV type in the save as type drop down.... The .csv format is a text file. If you need to you can just change the extension once you saved it down.. Is that what you meant? "Slinger" wrote: I have a worksheet in a workbook that I would like to export out as a text file and not affect the workbook, and name the text file to save as. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Slinger
Activate the sheet you want to save. click on File|Save As. Select a CSV or other text file format, name it and save. It only saves the one sheet, without affecting the others. It also changes the name of the sheet to the saved name. You can just change this back "Slinger" wrote: I have a worksheet in a workbook that I would like to export out as a text file and not affect the workbook, and name the text file to save as. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I export text from excel autoshapes to a text file? | Excel Discussion (Misc queries) | |||
export excel file as csv with text delimiter of " | Excel Discussion (Misc queries) | |||
Export excel file to semicolon delimited text file | Excel Discussion (Misc queries) | |||
How can I export cell content in Excel to a text file? | Excel Programming | |||
export a text file which more than 65536 rows into excel | Excel Programming |