This is the code I use to do this function:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "tbl/qryName", "directory\filename.xls", True
MsgBox "Excel File has been created"
* An export profile is not needed since Excel uses it's own format type.
* The first set of quotes can be either table or query.
* The directory structure can include a network path: \\server\directory\filename.xls
* As you type this is, the options such as acExport and acSpreadsheet will begin to fill in automatically. You may choose to save the spreadsheet in a lower version.
* The 'True' option tells the system that you want column headers as well. This can be left blank.
* I put a simple MsgBox function afterward to let me know that everything is done.
* You can place this code in under the 'On Click' event procedure for your button.
* You will probably need to reformat your columns in the spreadsheet.