ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ActiveWorkbook.SaveAs Format(Date, €śmmddyy€ť) & €ś.csv€ť (https://www.excelbanter.com/excel-programming/433870-activeworkbook-saveas-format-date-%E2%80%9Cmmddyy%E2%80%9D-%E2%80%9C-csv%E2%80%9D.html)

LuisE

ActiveWorkbook.SaveAs Format(Date, €śmmddyy€ť) & €ś.csv€ť
 
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




Jacob Skaria

ActiveWorkbook.SaveAs Format(Date, €śmmddyy€ť) & €ś.csv€ť
 
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
---------------
Jacob Skaria


"LuisE" wrote:

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




JLGWhiz[_2_]

ActiveWorkbook.SaveAs Format(Date, "mmddyy") & ".csv"
 
Would you like to share with us what the error message says?


"LuisE" wrote in message
...
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






LuisE

ActiveWorkbook.SaveAs Format(Date, "mmddyy") & ".csv"
 
Thanks I just did what Jacob suggested and it worked

"JLGWhiz" wrote:

Would you like to share with us what the error message says?


"LuisE" wrote in message
...
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








All times are GMT +1. The time now is 05:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com