How to separately save spreedsheets from the same workbook

A

anaipa

Hello

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

Txs
 
G

Gary''s Student

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top