-
Saving file
I have this macro to save my file as the name "Cash report (today's date)." This file is supposed to save in the location G:\Fixed Income\Cash and Debit reports but for some reason it is not saving there. Does something look wrong to you in the below code??
[VBA]Sub SaveCashreport()
todaysdate = Application.InputBox("Enter Today's Date for File Name", "Today's Date")
ChDir "G:\Fixed Income\Cash and Debit reports"
ActiveWorkbook.Saveas Filename:="Cash report" + " " + "(" + todaysdate + ")" + ".xls", _
FileFormat:=xlExcel8, CreateBackup:=False
End Sub[/VBA]
-
[vba]
Sub SaveCashreport()
todaysdate = Application.InputBox("Enter Today's Date for File Name", "Today's Date")
ActiveWorkbook.Saveas Filename:=""G:\Fixed Income\Cash and Debit reports"\Cash report" + " " + "(" + todaysdate + ")" + ".xls", _
FileFormat:=xlExcel8, CreateBackup:=False
End Sub [/vba]
This assumes you enter today's date in an acceptable format (i.e. not with / in it)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules