更新时间:2022-10-23 21:24:07
.SaveAs文件名: C:\Users\sales\desktop\)&范围(A2)。 .csv,_
FileFormat =:xlCSV
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
.SaveAs Filename:=("C:\Users\sales\desktop\") & Range("A2").Text & ".csv", _
FileFormat=:xlCSV