嗨,我是新手,正在尝试从表单按钮对象 OnClickEvent() 中获取以下代码:
Private Sub Command0_Click()
Dim objOtherTbls As AdditionalData
Set objOtherTbls = Application.CreateAdditionalData
'Identify the tables or querys to export
objOtherTbls.Add "Cycle"
objOtherTbls.Add "Cycle1"
'Here is where the export takes place
Application.ExportXML ObjectType:=acExportTable, _
DataSource:="DACT1", _
DataTarget:="C:\myxml.xml", _
AdditionalData:=objOtherTbls
MsgBox "Export operation completed successfully."
End Sub
但是我收到运行时错误 2467:您输入的表达式引用了一个已关闭或不存在的对象。
调试器指向这一行:'AdditionalData:=objOtherTbls' 任何人都可以帮忙吗?