Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Hi, I have multiple worksheets, and I need to save them in text tab delimited format. How can I do this using macros? For example I have 5 worksheets, the macro would save the worksheets as sheet1.txt, sheet2.txt, sheet3.txt etc... Thanks! -- lqfong ------------------------------------------------------------------------ lqfong's Profile: http://www.excelforum.com/member.php...o&userid=35774 View this thread: http://www.excelforum.com/showthread...hreadid=555908 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Option Explicit
Sub testme() Dim wks As Worksheet Dim newWks As Worksheet For Each wks In ActiveWorkbook.Worksheets wks.Copy 'to a new workbook Set newWks = ActiveSheet With newWks Application.DisplayAlerts = False .Parent.SaveAs Filename:="C:\TEMP\" & .Name & ".txt", _ FileFormat:=xlText Application.DisplayAlerts = True .Parent.Close savechanges:=False End With Next wks End Sub If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm lqfong wrote: Hi, I have multiple worksheets, and I need to save them in text tab delimited format. How can I do this using macros? For example I have 5 worksheets, the macro would save the worksheets as sheet1.txt, sheet2.txt, sheet3.txt etc... Thanks! -- lqfong ------------------------------------------------------------------------ lqfong's Profile: http://www.excelforum.com/member.php...o&userid=35774 View this thread: http://www.excelforum.com/showthread...hreadid=555908 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving with Macro | Excel Discussion (Misc queries) | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Applying same macro to all worksheets in workbook | Excel Discussion (Misc queries) | |||
Macro to change worksheets in the same workbook | Excel Discussion (Misc queries) | |||
Saving without Macro | Excel Discussion (Misc queries) |