Hi,
I am attempting to write a VBA function that transfers data from a query in access to an excel spreadsheet. The code is as follows:
I get an error that complains that the object "dataroaming" does not exist. However the query definately exists.
Does anybody have an idea of what the problem may be?
Thankyou!
I am attempting to write a VBA function that transfers data from a query in access to an excel spreadsheet. The code is as follows:
Code:
'Export data to excel
Public Function dataExport()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "dataroaming", "C:\Reece.xls", True
MsgBox "Export Complete!"
DoCmd.Close
End Function
I get an error that complains that the object "dataroaming" does not exist. However the query definately exists.
Does anybody have an idea of what the problem may be?
Thankyou!