Hi,
I have this VBA code to save multiple worksheets into multiple files, it works great.
But it saves them as .prn files as I specified the file format as :xlTextPrinter (which i made bold below)
I was wondering if anyone had the list or link to a list of all vba code file formats that I could pick and choose from to replace xlTextPrinter when needed.
I would like to be able to save things as .txt, .las, .csv
Sub CreateNewWBS()
Dim wbThis As Workbook
Dim wbNew As Workbook
Dim ws As Worksheet
Dim strFilename As String
Set wbThis = ThisWorkbook
For Each ws In wbThis.Worksheets
strFilename = wbThis.Path & "/" & ws.Name
ws.Copy
Set wbNew = ActiveWorkbook
wbNew.SaveAs strFilename, FileFormat:=xlTextPrinter
wbNew.Close
Next ws
End Sub
Thanks
I have this VBA code to save multiple worksheets into multiple files, it works great.
But it saves them as .prn files as I specified the file format as :xlTextPrinter (which i made bold below)
I was wondering if anyone had the list or link to a list of all vba code file formats that I could pick and choose from to replace xlTextPrinter when needed.
I would like to be able to save things as .txt, .las, .csv
Sub CreateNewWBS()
Dim wbThis As Workbook
Dim wbNew As Workbook
Dim ws As Worksheet
Dim strFilename As String
Set wbThis = ThisWorkbook
For Each ws In wbThis.Worksheets
strFilename = wbThis.Path & "/" & ws.Name
ws.Copy
Set wbNew = ActiveWorkbook
wbNew.SaveAs strFilename, FileFormat:=xlTextPrinter
wbNew.Close
Next ws
End Sub
Thanks