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 the end of some lines in my txt-files. What is the best way to avoid those empty spaces?
Is it possible to make some kind of loop to my macro? Or is there an existing "command" (member) in some class?
I really appreciate any of your tips!
-Beginner81-
Bookmarks