I use the following code on a command button to save "Table1" as an excel spreadsheet called Table1.xls in a folder called export folder.
This works fine but I would like to save the spreadsheet like this: "Current Date"Table1.xls
So if I did it today it would look something like this "280808Table1.xls"
Any ideas how I can do this?
Thanks
Code:
Private Sub Command14_Click()
stDocName = "Table1"
DoCmd.TransferSpreadsheet [acExport], , stDocName, _
"C:\Export Folder\Table1.xls", 0
End Sub
This works fine but I would like to save the spreadsheet like this: "Current Date"Table1.xls
So if I did it today it would look something like this "280808Table1.xls"
Any ideas how I can do this?
Thanks