Try something like this (untested):
Change "theFileName.csv" to the required file name, maybe including the sheet name.Code:For Each objWorksheet In objExcelBook.Worksheets objWorksheet.Copy objExcel.ActiveWorkbook.SaveAs "theFileName.csv", 23 objExcel.ActiveWorkbook.Close False Next




Reply With Quote