i have a macro that saves a copy of my workbook that works but it saves as a .xlsm and i need it to be saved as a comma delimited .csv file type can any one help me?
here is the macro i have now
Sub toCSV()
Dim newWB As Variant Dim wb1 As Workbook Set wb1 = ActiveWorkbook With wb1 .SaveCopyAs ("C:\Users\sales\desktop\") & Range("A2").Text & ".xlsm" End With End Sub
Code:
This code will take the sheet you want to be saved as a CSV, and copy it to a new workbook before saving
This will allow you to save the file as a CSV, but still retain the original macro enabled spreadsheet which you can go back to, and do whatever other processing you need
Try adding this to your code:
And changing the '.xlsm' to '.csv'
I also highly suggest you look here for future questions with regard to saving!