Hi I am using this VBA code it is working fine. I have 3 different queries in MS Access and I am exporting xlsx file in my C drive as 1 file contains 3 tabs but I need date end of the file.
Private Sub Command3_Click()
Dim xl As Object
DoCmd.TransferSpreadsheet acExport, , "Daily Delivered", "C:\Input\Western Perishable File.xlsx", True
DoCmd.TransferSpreadsheet acExport, , "Dock Volume", "C:\Input\Western Perishable File.xlsx", True
DoCmd.TransferSpreadsheet acExport, , "Dock Volume", "C:\Input\Western Perishable File.xlsx", True
Set xl = CreateObject("Excel.application")
xl.workbooks.Open ("C:\Input\Western Perishable File.xlsx")
xl.Visible = True
Set xl = Nothing
End Sub
It create files Western Perishable File.xlsx in my c drive contains all above three tabs.
But I want to add date at the end of this file, it should be like this Western Perishable File-Nov-17-2017.xlsx