簡體   English   中英

Avaya CMS Automation_Error Via VBA

[英]Avaya CMS Automation_Error Via VBA

在宏下運行時出現以下錯誤。 我只從這一邊復制了這個宏。 我正在使用下面的宏從 Avaya CMS 復制 excel 中的轉儲。

在此處輸入圖片說明

代碼如下。 我在步驟中遇到錯誤:

Set cvsApp = CreateObject("ACSUP.cvsApplication")

Sub GetIntervalData()
Dim cvsApp As Object
Dim cvsConn As Object
Dim cvsSrv As Object
Dim Rep As Object
Dim Info As Object, Log As Object, b As Object
On Error Resume Next
Set cvsApp = CreateObject("ACSUP.cvsApplication")
Set cvsConn = CreateObject("ACSCN.cvsConnection")
Set cvsSrv = CreateObject("ACSUPSRV.cvsserver")
Set Rep = CreateObject("ACSREP.cvsReport")
'Clear Data
Sheets("Sheet1").Select
Range("A1:AR300").ClearContents
Sheets("Domestic").Activate
serverAddress = "*****"
UserName = "*****"
Password1 = "*****"
If cvsApp.CreateServer(UserName, "", "", serverAddress, False, "ENU", cvsSrv, cvsConn) Then
If cvsConn.Login(UserName, Password1, serverAddress, "ENU") Then
On Error Resume Next
   cvsSrv.Reports.ACD = 1
   Set Info = cvsSrv.Reports.Reports("Historical\Designer\SLA for skill(s) Daily Summary")
   If Info Is Nothing Then
      If cvsSrv.Interactive Then
          MsgBox "The report Historical\Designer\SLA for skill(s) Daily Summary", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
      Else
          Set Log = CreateObject("ACSERR.cvsLog")
          Log.AutoLogWrite "The report Historical\Designer\SLA for skill(s) Daily Summary"
          Set Log = Nothing
      End If
   Else
       b = cvsSrv.Reports.CreateReport(Info, Rep)
       If b Then
          Rep.Window.Top = 75
          Rep.Window.Left = 690
          Rep.Window.Width = 19140
          Rep.Window.Height = 11400
                  Rep.TimeZone = "default"
         Rep.SetProperty "Split/Skills", "CA10 CRU Parts;CA10 CRU Tech;CA14 ICG;CA10 LCSC;CA10 USEO P_1;CA14 ICG Overflow"
         Rep.SetProperty "Dates", "8/1/2020"
          Rep.SetProperty "Times", "00:00-23:30"
          b = Rep.ExportData("", 9, 0, False, False, True)
          Rep.Quit
              If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID
          Set Rep = Nothing
       End If
   End If
   Set Info = Nothing
End If
cvsApp.Servers.Remove cvsSrv.ServerKey
cvsConn.logout
cvsConn.Disconnect
cvsSrv.Connected = False
Set Log = Nothing
Set Rep = Nothing
Set cvsSrv = Nothing
Set cvsConn = Nothing
Set cvsApp = Nothing
Sheets("Sheet1").Select
Range("A1").Select
ActiveSheet.Paste
End If
Sheets("Sheet1").Activate
End Sub

在此處輸入圖片說明

在此處輸入圖像描述您能給我們您的 VBA 參考的屏幕截圖嗎? (如果有 MISSING:Libs 被選中,它們應該被取消選中)您是否還可以在 Excel 中的對象瀏覽器中查看該對象是否實際可用?

如果引用了對象/庫,則不必使用 CreateObject() 后期綁定。 工具 -> VBA 編輯器中的參考。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM