VBA - Generate Excel File from Access (QueryTable)

后端 未结 3 605
梦谈多话
梦谈多话 2021-02-09 00:08

I have a project that basically the goal is to generate Excel (Report) starting the Click of a button in Access using VBA.

The contents of this report is the result of a

3条回答
  •  爱一瞬间的悲伤
    2021-02-09 00:19

    You don't say what Office version, but in Excel 2007/10 a QueryTable is a property of a Listobject so your code would be like:

    With MeuExcel.Worksheets.ListObjects.Add(Connection:=rs, Destination:=Range("A2")).QueryTable
    

提交回复
热议问题