B
Beginner81
Hi everyone,
I tried to save my xls-sheets to txt-files with a following macro:
Sub SaveFiles()
Dim sh As Worksheet
For Each sh In ActiveWorkbook.Worksheets
' copy the sheet to its own workbook
sh.Copy
ActiveWorkbook.SaveAs "C:\Temp\" & sh.Name & ".txt", _
FileFormat:=xlTextWindows
ActiveWorkbook.Close SaveChanges:=False
Next
End Sub
Everything is fine except one thing. There comes some extra tabs to th
end of some lines in my txt-files. What is the best way to avoid thos
empty spaces?
Is it possible to make some kind of loop to my macro? Or is there a
existing "command" (member) in some class?
I really appreciate any of your tips!
-Beginner81
I tried to save my xls-sheets to txt-files with a following macro:
Sub SaveFiles()
Dim sh As Worksheet
For Each sh In ActiveWorkbook.Worksheets
' copy the sheet to its own workbook
sh.Copy
ActiveWorkbook.SaveAs "C:\Temp\" & sh.Name & ".txt", _
FileFormat:=xlTextWindows
ActiveWorkbook.Close SaveChanges:=False
Next
End Sub
Everything is fine except one thing. There comes some extra tabs to th
end of some lines in my txt-files. What is the best way to avoid thos
empty spaces?
Is it possible to make some kind of loop to my macro? Or is there a
existing "command" (member) in some class?
I really appreciate any of your tips!
-Beginner81