none
DoCmd.TransferSpreadsheet version 2010

    Question

  • I´m using DoCmd.TransferSpreadsheet like this

    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, DataSourceName, strSaveFileName, False


    It works fine using Excel & Access 2007 but it fails using 2010 version, is there any other function should I use for 2010 version?

    Should that function could be the problem?

    Thank you in advance!

    Friday, August 13, 2010 3:39 PM

Answers


  • I haven't installed 2010 yet, but your code looks fine (I haven't touched Access VBA in a little while thought...could be wrong here).  Anyway, look here for some great information, and probably a solution to your problem:

    http://www.accessmvp.com/KDSnell/EXCEL_Import.htm

    Here's a thought, check your references to see if any are marked "MISSING".  In Access, hit Alt+F11, then in the VBE window, click Tools > References.  Remove references if they are not needed, add references that are needed (i.e., marked "MISSING").  I'm using 2007 now; My excel Reference is: Microsoft 12.0 Object Library.  For 2010, it may be Microsoft 13.0 Object Library . . . not sure.

    • Marked as answer by Bessie Zhao Friday, August 27, 2010 10:17 AM
    Saturday, August 14, 2010 1:22 PM
  • Hi Francis,
     
    TransferSpreadsheet works in 2010. Try compiling the app to see if it highlights any errors, and if not, try compacting the database.
     

    I´m using DoCmd.TransferSpreadsheet like this

    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, DataSourceName, strSaveFileName, False


    It works fine using Excel & Access 2007 but it fails using 2010 version, is there any other function should I use for 2010 version?

    Should that function could be the problem?

    Thank you in advance!


    Regards, Graham R Seach Microsoft Access MVP Sydney, Australia
    • Marked as answer by Bessie Zhao Friday, August 27, 2010 10:17 AM
    Sunday, August 15, 2010 10:42 AM

All replies


  • I haven't installed 2010 yet, but your code looks fine (I haven't touched Access VBA in a little while thought...could be wrong here).  Anyway, look here for some great information, and probably a solution to your problem:

    http://www.accessmvp.com/KDSnell/EXCEL_Import.htm

    Here's a thought, check your references to see if any are marked "MISSING".  In Access, hit Alt+F11, then in the VBE window, click Tools > References.  Remove references if they are not needed, add references that are needed (i.e., marked "MISSING").  I'm using 2007 now; My excel Reference is: Microsoft 12.0 Object Library.  For 2010, it may be Microsoft 13.0 Object Library . . . not sure.

    • Marked as answer by Bessie Zhao Friday, August 27, 2010 10:17 AM
    Saturday, August 14, 2010 1:22 PM
  • Hi Francis,
     
    TransferSpreadsheet works in 2010. Try compiling the app to see if it highlights any errors, and if not, try compacting the database.
     

    I´m using DoCmd.TransferSpreadsheet like this

    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, DataSourceName, strSaveFileName, False


    It works fine using Excel & Access 2007 but it fails using 2010 version, is there any other function should I use for 2010 version?

    Should that function could be the problem?

    Thank you in advance!


    Regards, Graham R Seach Microsoft Access MVP Sydney, Australia
    • Marked as answer by Bessie Zhao Friday, August 27, 2010 10:17 AM
    Sunday, August 15, 2010 10:42 AM