'Extract information from Avaya CMS and paste directly into a worksheet

I have the code below to extract information from Avaya CMS and paste it directly into a worksheet.

It worked until we switched from Excel 2010 to Excel 2016.

Now it gives me this error:

"runtime error '-2147319783 (80028019)':
Automation error
Old format or invalid type library"

On Set cvsSrv = cvsApp.Servers(1)

Dim cvsApp As New ACSUP.cvsApplication
Dim cvsSrv As New ACSUPSRV.cvsServer
Dim Rep As New ACSREP.cvsReport
Dim Info As Object, Log As Object, b As Object
Dim logged As Boolean
Dim timevar As String

Public Sub CMS_REL()
Application.ScreenUpdating = 0
sk = "66"

Sheets("Per Teams").Activate
timevar = Range("F20")

Set cvsSrv = cvsApp.Servers(1)
Call doRep("Historical\Designer\Agent ACD Release (MultiSkill)", sk)

Sheets("Released").Select
Range("A:H").Select
Selection.ClearContents
Range("A1").Select
ActiveSheet.Paste
Range("A1").Select
Sheets("Per Teams").Select

logout
Application.ScreenUpdating = 1

End Sub


Sub doRep(sReportName As String, ByVal sk As Integer)

On Error Resume Next
cvsSrv.Reports.ACD = 1
Set Info = cvsSrv.Reports.Reports(sReportName)
If Info Is Nothing Then
    If cvsSrv.Interactive Then
        MsgBox "The Report " & sReportName & " was not found on ACD 1", vbCritical Or vbOKOnly, "CentreVu Supervisor"
    Else
        Set Log = CreateObject("ACSERR.cvslog")
        Log.AutoLogWrite "The Report " & sReportName & " was not found on ACD 1"
        Set Log = Nothing
    End If
Else
    b = cvsSrv.Reports.CreateReport(Info, Rep)
    If b Then
        Debug.Print Rep.SetProperty("Splits/Skills", "64-72")
        Debug.Print Rep.SetProperty("Dates", 0)
        Debug.Print Rep.SetProperty("Times", "00:00-" & timevar)
        b = Rep.ExportData("", 9, 0, True, True, True)
        Rep.Quit
        If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID
        Set Rep = Nothing
    End If
End If

Set Info = Nothing

End Sub

Sub logout()
Set Log = Nothing
Set Rep = Nothing
Set cvsSrv = Nothing
Set cvsApp = Nothing

End Sub


Solution 1:[1]

Change this line

Dim cvsApp As New ACSUP.cvsApplication

to this

  Dim cvsApp As Object
  Set cvsApp = CreateObject("ACSUP.cvsApplication")

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Joe G