1

I need some help here please :( ok here is what i want to do, open excel and run a interval report (("Historical\Designer\GSD CR Summary Interval Report") from CMS (call management system). When I open my excel file i will select the time/date range and skills for CMS to search for. please see the image below:enter image description here once all the required feilds are filled in you click generate report and the VBA will take over, clear all the data from CMS RawData and paste in the new data. I keep getting an undefined error for this and cant get my head around it... the code is: `'

Created by Keith Carpenter
06/01/2016


Dim cvsApp As New ACSUP.cvsApplication
Dim cvsConn As New ACSCN.cvsConnection
Dim cvsSrv As New ACSUPSRV.cvsServer
Dim Rep As New ACSREP.cvsReport
Dim Info As Object, Log As Object, b As Object


'This method is the main function that prepare the extraction from CMS to    load in Excel
Public Sub ReportInterval()
On Error GoTo ErrHandler:

Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Unhide_Sheets

'Clean the MTD sheet
Sheets("CMS_RawData").Select
Cells.Select
Selection.ClearContents
Range("A1").Select

'Checking if current CMS session is opened
Set cvsSrv = cvsApp.Servers(1)
Sheets("SLA Dashboard").Select

'Select first skill in the list
Range("F8").Select
Dim sSkills As String
Dim sDate As String
Dim sTimes As String

'The report will run for each skills listed in the first table
For Each c In Sheets("Settings").Range("A2:A26")
    If (Not IsEmpty(c.Value)) Then
        sSkills = sSkills & ";" & c.Text
    End If
Next c

If ActiveSheet.Range("F6").Text = ActiveSheet.Range("F7").Text Then
    sDate = ActiveSheet.Range("F6")
Else
    sDate = ActiveSheet.Range("F6") & "-" & ActiveSheet.Range("F7")
End If

  If ActiveSheet.Range("F4").Text = ActiveSheet.Range("F5").Text Then
    sTimes = ActiveSheet.Range("F5")
Else
    sTimes = ActiveSheet.Range("F4") & "-" & ActiveSheet.Range("F5")
End If


'Call GSD CR Summary Interval Report
Call doRep("Historical\Designer\GSD CR Summary Interval Report", Right(sSkills, Len(sSkills) - 1), sDate, sTimes)

'Copy the content of the clipboard in Excel
Sheets("CMS_RawData").Select
Range("A1").Select

Selection.PasteSpecial

'Close the connection
Call logout


Exit Sub

     ErrHandler:
    If Err.Number <> 91 Then
    MsgBox "Please log in to CMS", vbOKOnly, "Error"
End If
 Resume Next
 End Sub

here is the error i am receiving: enter image description here

Any help here will be greatly appreciated.`

Community
  • 1
  • 1
Ketih Carpenter
  • 85
  • 2
  • 3
  • 9
  • 1
    That error typically indicates you need to add a reference in your VB project (via Tools >> References). VBA doesn't know anything about Avaya-related objects, so you need to add the appropriate library for those types. – Tim Williams Jan 07 '16 at 17:29
  • I've been automating reports via Excel/Avaya for the past two years, and Tim hit the nail on the head. As he advised, you'll want to access the references in your VB project in Excel, and add: `Application Component`, `Connection Component`, `Report Component`, and `Server Component`. If you need further help, let me know. – Fata1Err0r Dec 12 '16 at 18:55

1 Answers1

0

Just change Dim cvsConn as New ACSCN.cvsConnection to Dim cvsConn as Object.

RCaetano
  • 642
  • 1
  • 8
  • 23