J
Jean-Francois Gauthier
I have the following code to export to spreadsheet. This is working fine
for me. The only thing I want is to have a custom file name to save my
spreadsheet as. This would leave to the user to simply select where he/she
wants to save the file. Below, stdocname is the name of the query that I
want to be exporting.
I would like my file name to be something like this:
"Bundles Query Search as of Now()", where Now() is today's date using the
format(Date(),"yyyy-mm-dd")
Is this possible?
Private Sub Command36_Click()
On Error GoTo Err_Command36_Click
Dim stDocName As String
stDocName = "Bundles Query Search"
DoCmd.OutputTo acOutputQuery, stDocName, acSpreadsheetTypeExcel9
Exit_Command36_Click:
Exit Sub
Err_Command36_Click:
MsgBox Err.Description
Resume Exit_Command36_Click
End Sub
for me. The only thing I want is to have a custom file name to save my
spreadsheet as. This would leave to the user to simply select where he/she
wants to save the file. Below, stdocname is the name of the query that I
want to be exporting.
I would like my file name to be something like this:
"Bundles Query Search as of Now()", where Now() is today's date using the
format(Date(),"yyyy-mm-dd")
Is this possible?
Private Sub Command36_Click()
On Error GoTo Err_Command36_Click
Dim stDocName As String
stDocName = "Bundles Query Search"
DoCmd.OutputTo acOutputQuery, stDocName, acSpreadsheetTypeExcel9
Exit_Command36_Click:
Exit Sub
Err_Command36_Click:
MsgBox Err.Description
Resume Exit_Command36_Click
End Sub