Hi
I'm using the following code to export an access query to excel:
Code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Ready for letter", "C:\Users\XXXXX\Readyforlettersend.xlsx"
, True
Is there any way of adding some code to ensure that when the query is exported to excel it's exported as a table.
I tried recording a macro to see how excel makes a Table but i can't seem to integrate it into my VBA code in access.
Code:
ListObjects.Add(xlSrcRange, Range("$A$1:$Q$3"), , xlYes).Name = _ "Table1"
Range("Table1[#All]").Select
Many thanks in advance.
Kind regards