
Originally Posted by
littleiitin
Below is the code for saving workbook as csv for Multiple saving you can use loop
Code:
Sub SaveasCSV()
Dim strPath As String
Dim strFileName As String
strPath = "C:\Users\324954\Desktop\" ' Use your Path
strFileName = "MyFile" ' Use your File Name
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=strPath & strFileName, _
FileFormat:=xlCSV, CreateBackup:=False
Application.DisplayAlerts = True
End Sub
Hi littleiitin,
Your code perfectly works. Thanks for that. But it replaces the name of my current workbook as sheet2.csv.. or i can say it closes my macro sheet.
How to debug this. I guess something to do with the line below . Please help
Code:
ActiveWorkbook.SaveAs Filename:=strPath & strFileName, _
Bookmarks