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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DoCmd.TransferSpreadsheet

Status
Not open for further replies.

Kalyan Ganesan

Programmer
May 10, 2017
93
US
When i use DoCmd.TransferSpreadsheet to export, it assings a default folder and it allows me only to give the file name,how do i assign the folder name as well?
 
This works for me:
Code:
Sub testExport()
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "tblShifts", "C:\data\access\MyExcelFile.xls", True
End Sub

Do you get an error message?

Duane
Vevey, Switzerland
Hook'D on Access
MS Access MVP 2001-2016
 
Your code works..thanks...so the trick is to use acSpreadsheetTypeExcel9 right?
 
I don't think the type has anything to do with the issue unless it's a combination of type and file name.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top