Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have a file that contains multiple sheets. I'd like to be able to save sheets from 5 to 10 as individual files in the .txt format with the name of the sheets. thank you Igor |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for i = 5 to 10
worksheets(i).copy Activeworkbook.SaveAs activesheet.Name & ".xls" Activeworkbook.Close SaveChanges:=False Next -- Regards, Tom Ogilvy "igorek" wrote in message ... Hello, I have a file that contains multiple sheets. I'd like to be able to save sheets from 5 to 10 as individual files in the .txt format with the name of the sheets. thank you Igor |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
While your code does save file as .txt, it does not actually ask Excel for any specific txt format (text delimited or OS/2 Mac). Is there a way to specify it? Thank you Igor |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, I missed the .txt in your post. (bad eyes).
for i = 5 to 10 worksheets(i).copy Activeworkbook.SaveAs activesheet.Name & ".txt" FileFormat:=xlText Activeworkbook.Close SaveChanges:=False Next also xlCSV and others - see excel vba help on FileFormat -- Regards, Tom Ogilvy "igorek" wrote in message ... Tom, While your code does save file as .txt, it does not actually ask Excel for any specific txt format (text delimited or OS/2 Mac). Is there a way to specify it? Thank you Igor |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selecting "Save As" adds "Copy of" to file name- MS Excel 2007 | Excel Discussion (Misc queries) | |||
a Macro to "save as" filename from a cell on the sheet and then pr | Excel Discussion (Misc queries) | |||
"CELL("FILENAME") NOT UPDATE AFTER "SAVE AS" ACTION | Excel Discussion (Misc queries) | |||
"Save" and "Save As" options greyed out - "Save as Webpage" option | Excel Discussion (Misc queries) | |||
Can I "Save As..." an Excel Sheet to an Access Table? | Excel Programming |