I'm sorry that I'm unable to put all of this together, but you mentioned
"Then you can just call the function like this:
SendTQ2XLWbSheet "QueryNameHereInQuotes", "SheetNameHereInQuotes", "FilePathAndFileNameAndExtensionHere"
So if you had a query named qryMyQuery and the sheet is "Sheet2" and the file name is C:\Temp\Something.xls you would use
SendTQ2XLWbSheet "Account Category qry", "Account_Category_qry", "C:\Documents and Settings\tonyab\My Documents\Accesshelp\Variance Analysis.xls"
So I believe by call function you mean to create a macro to run the code, but do you create the macro in Access where the query is or Excel where the spreadsheet is.