How to separately save spreedsheets from the same workbook

  • Thread starter Thread starter anaipa
  • Start date Start date
A

anaipa

Hello

How can I save spreedsheets from the same .xls workbook maintaining the tab
name on my desktop in .txt format?

Txs
 
Try this macro:

Sub Macro1()
s1 = "C:\Documents and Settings\Owner\Desktop\"
For Each sh In Sheets
sh.Activate
s2 = sh.Name & ".txt"
ActiveWorkbook.SaveAs Filename:=s1 & s2, FileFormat:=xlText
Next
End Sub
 
Back
Top