Klartigue
02-19-2015, 11:08 AM
Right now, I use this code to save a file. In the input box I put the format 2.18.2015 for example. However, it never gets saved in the correct location so I am not sure if I need to tweek the macro/not sure if there is a reason it won't save in the correct location.
I don't know if there is an automatic default where I can say save as OTHER pricing (2.18.2015).xlsx ? Date is previous days business date, also the date in cell A1 so I don't know if there is a way to chanel that data in the cell when saving? I just need to save with the previous day's date and have it save in the correct folder but right now with the input box it won't save in the correct location everytime.
Sub SaveDebitreport1()
TodaysDate = Application.InputBox("Enter Today's Date for File Name", "Today's Date")
ChDir "G:\Fixed Income\Cash and Debit reports"
ActiveWorkbook.Saveas FileName:="Debit report" + " " + "(" + TodaysDate + ")" + ".xls", _
FileFormat:=xlExcel8, CreateBackup:=False
End Sub
I don't know if there is an automatic default where I can say save as OTHER pricing (2.18.2015).xlsx ? Date is previous days business date, also the date in cell A1 so I don't know if there is a way to chanel that data in the cell when saving? I just need to save with the previous day's date and have it save in the correct folder but right now with the input box it won't save in the correct location everytime.
Sub SaveDebitreport1()
TodaysDate = Application.InputBox("Enter Today's Date for File Name", "Today's Date")
ChDir "G:\Fixed Income\Cash and Debit reports"
ActiveWorkbook.Saveas FileName:="Debit report" + " " + "(" + TodaysDate + ")" + ".xls", _
FileFormat:=xlExcel8, CreateBackup:=False
End Sub