如何导出数据表型子窗体内容到Excel-Access
2个回答
展开全部
Private Sub Command1_Click()
Dim obj As Object
Me![子窗体名称].SetFocus
DoCmd.RunCommand acCmdSelectAllRecords
DoCmd.RunCommand acCmdCopy
DoEvents
SendKeys "{TAB}", True
Set obj = CreateObject("Excel.Application")
obj.Workbooks.Add
obj.Visible = True
SendKeys "^v", True
End Sub
Dim obj As Object
Me![子窗体名称].SetFocus
DoCmd.RunCommand acCmdSelectAllRecords
DoCmd.RunCommand acCmdCopy
DoEvents
SendKeys "{TAB}", True
Set obj = CreateObject("Excel.Application")
obj.Workbooks.Add
obj.Visible = True
SendKeys "^v", True
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询