Saves the active worksheet in the workbook named MyWorkbook.xls as a comma-delimited text file named test.csv:
Sub csvSave() Workbooks("MyWorkbook.xls").SaveAs Filename:=ActiveWorkbook.Path & _ "\test.csv", FileFormat:=xlCSV End Sub