Link to home
Start Free TrialLog in
Avatar of Phil Chapman
Phil ChapmanFlag for United States of America

asked on

Save Excel File as a Tab Delimited File

How can I modify the code below to save the OutPutFileName file as a Tab Delimited File

Public Sub saveSheets(InputFileName as String,OutPutFileName as String)

  Dim xlApp As Object
  Dim xlBook As Object
  Dim xlSheet As Object
  Dim strOutputFileName

  Set xlApp = CreateObject("Excel.Application")
  Set xlBook = xlApp.Workbooks.Open(InputFileName)  ' Excel File
  For Each xlSheet In xlBook.Worksheets    
    xlSheet.SaveAs OutPutFileName   ' Needs to save as Tab Delimited File
  Next
  xlApp.Quit

End Sub
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

xlSheet.SaveAs OutPutFileName FileFormat:=xlText
ASKER CERTIFIED SOLUTION
Avatar of Phil Chapman
Phil Chapman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It looks like it's a WorkBook function


   ActiveWorkbook.SaveAs FileName:= OutPutFileName, FileFormat:=xlText
Avatar of Phil Chapman

ASKER

Solution did not work and expert provided no follup up