业务对象从 Excel 启动
Business Objects Launch from Excel
我正在使用 VBA 为自己创建一个 Business Objects 宏。我在论坛上到处都发现了这段代码和其他类似的代码。然而,在 VBA 中编译后,一切都在 Set BoApp 阶段开始冻结。我在创建对象时遗漏了什么吗? BusinessObjects.application 是否必须说一些特定于我的 Business Objects 目录的其他内容?
感谢任何帮助!
Sub Open_Reports()
Dim BoApp As Object
Application.DisplayAlerts = False
Application.Wait (Now + TimeValue("1:00:00"))
On Error Resume Next
Set BoApp = CreateObject("BusinessObjects.application")
With BoApp
.Visible = True
.LoginAs "username", "password", , "DVBOCEN-APP01"
.documents.Open ("Q:\MI Reporting (BAU)\BAU Daily\Operational Reports\All reports\Sales - Advisor - Daily.rep")
With .Activedocument
.Refresh
.Close
End With
.Application.Quit
End With
Set BoApp = Nothing
ThisWorkbook.Saved = True
.Quit
结束子
不确定它是否有帮助,因为它应该以任何一种方式工作,但请尝试:
Dim BoApp As busobj.Application
和
Set BoApp = New busobj.Application
我假设您能够手动成功启动 DeskI 应用程序,并且您已经添加了 BusinessObjects x 对象库作为参考?
我正在使用 VBA 为自己创建一个 Business Objects 宏。我在论坛上到处都发现了这段代码和其他类似的代码。然而,在 VBA 中编译后,一切都在 Set BoApp 阶段开始冻结。我在创建对象时遗漏了什么吗? BusinessObjects.application 是否必须说一些特定于我的 Business Objects 目录的其他内容?
感谢任何帮助!
Sub Open_Reports()
Dim BoApp As Object
Application.DisplayAlerts = False
Application.Wait (Now + TimeValue("1:00:00"))
On Error Resume Next
Set BoApp = CreateObject("BusinessObjects.application")
With BoApp
.Visible = True
.LoginAs "username", "password", , "DVBOCEN-APP01"
.documents.Open ("Q:\MI Reporting (BAU)\BAU Daily\Operational Reports\All reports\Sales - Advisor - Daily.rep")
With .Activedocument
.Refresh
.Close
End With
.Application.Quit
End With
Set BoApp = Nothing
ThisWorkbook.Saved = True
.Quit
结束子
不确定它是否有帮助,因为它应该以任何一种方式工作,但请尝试:
Dim BoApp As busobj.Application
和
Set BoApp = New busobj.Application
我假设您能够手动成功启动 DeskI 应用程序,并且您已经添加了 BusinessObjects x 对象库作为参考?