Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TransferSpreadsheet Action

Status
Not open for further replies.

izzyq

MIS
Mar 13, 2002
38
CA
I am trying to export a table from access called "CapexCurrentYear" into an xl spreadsheet. The first few times worked like a charm but now it will only export the titles of the columns but no data. Here is the code that I have used so far.


Sub transferspreadshee()

DoCmd.transferspreadsheet acExport, 8, _
"CapexCurrentYear", "Y:\IQ38316\Data\Excel\Financial Operating Results - Development rev.6.xls", False, "CAPEX Data!"

End Sub

Thanks is advance
 
my code is slightly different, but I am assuming mostly it's because of who wrote it.

what's that underscore in your code just after "8," is that just for the continuation of the line?

Also the 'Sub' is called "transferspreadshee" are you missing a "T" or is that correct?

I don't know what's wrong, you must have changed something between when it worked and now. All of your variables are named correctly? the table has data?

Code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "UnmatchedTrx", FileName, True, ""

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top