Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
save as text
Since you're saving a single sheet, just copy it to a new workbook and save that
workbook. Then close it. worksheets(".inp").copy with activesheet.parent .saveas filename:="d:\temp\temp.inp", FileFormat:=xlText .close savechanges:=false end with Sean wrote: I have an .xls document with 4 worksheets. I am trying to save the second tab (from left to right) named ".inp" as a text file named temp.inp This works fine in Windows 2000 Using the following VBA Code: 'activate the sheet I want to save Sheets(".inp").Select 'save as text file ActiveWorkbook.SaveAs Filename:="d:\temp\temp.inp", FileFormat _:=xlText, CreateBackup:=False when I run this on Windows XP, it selects he correct sheet (which is the second of four sheets), but when the file saves, it saves the LAST (the fourth of four) worksheet as the text file. Is this an error in Excel or XP? I can move the worksheet I want to save as a text file to the end (make it the last sheet), but this is only a temp fix The two systems: Windows 2000, Excel 200 pro (works fine) Windows XP, Excell 2000 pro (saves wrong sheet as text file) any comments or suggestions? -- Thanks in advance! Sean -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel save as csv - force text qualifier on every text field | Excel Discussion (Misc queries) | |||
How to save text as CSV which also contains commas? | Excel Discussion (Misc queries) | |||
save as text question | Excel Discussion (Misc queries) | |||
Export (or save as) .csv with text delimiters | Excel Discussion (Misc queries) | |||
Save As - Multiple Sheets fails to save as text file | Excel Programming |