ActiveWorkbook.SaveAs Format(Date, “mmddyyâ€) & “.csvâ€

  • Thread starter Thread starter LuisE
  • Start date Start date
L

LuisE

Using Excel 2007 I'm getting an error message.


ActiveWorkbook.SaveAs "C:\Users\Michael Guergawi\Documents\†& Format(Date,
“mmddyyâ€) & “.csvâ€


what Am I missing?

Thanks in advance
 
Try the below...The file format is to be specified

Dim strFile As String

strFile = "C:\Users\Michael Guergawi\Documents\" & _
Format(Date, "mmddyy") & ".csv"

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=strFile, FileFormat:=xlCSVMSDOS
Application.DisplayAlerts = True

If this post helps click Yes
 
Back
Top