Writing Excel VBA to receive data from Access

前端 未结 3 1383
南方客
南方客 2020-12-08 17:41

I am writing an excel application that draws from an Access database for work. When the user opens the Excel tool, a data table needs to populate one of the worksheets from

3条回答
  •  一生所求
    2020-12-08 18:03

    It works fine on my machine (except the field names get overwritten by the first row of data - for the field names you probably mean TargetRange.Offset(0, intColIndex)).

    Do you have a Tools -> References... to the Microsoft DAO 3.6 Object library?

    Are you perhaps using the 64-bit version of Excel 2010 (check under File->Help in the 'About Microsoft Excel' section)? If so the old version DAO libraries won't work, and you'll need to install the 64-bit ACE DAO library, which is available for 64-bit.

提交回复
热议问题