× Welcome to the fracta.net forum!

Share your coding ideas or ask questions.

Excel VBA macro automate update of Login Identifiers.

  • Tyger0951
  • Topic Author
  • Visitor
  • Visitor
7 years 3 months ago #444 by Tyger0951
At the center I work at we recycle agent ids and just update the names. With help from threads on this forum was able to build the code to update the names. Thought I'd share.
Sub Rename()

Dim cvsApp As Object
Dim cvsConn As Object
Dim cvsSrv As Object
Dim Agentname As String
Dim AgentID As String

Set cvsApp = CreateObject("ACSUP.cvsApplication")
Set cvsConn = CreateObject("ACSCN.cvsConnection")

Set cvsSrv = cvsApp.Servers(1) 'Uses Current Running Avaya

 cvsSrv.Dictionary.ACD = 2 'could be 1 for others
 b = cvsSrv.Dictionary.CreateOperation("Login Identifications", Op)
For Each Cell In Sheets("MasterId").Range("B:B")

    Agentname = Sheets("MasterID").Range("A2").Value
    AgentID = Sheets("MasterID").Range("B2").Value
        Op.SetProperty "login_id", "" & AgentID & ""
        Op.SetProperty "ag_name", "" & Agentname & ""
        b = Op.DoAction("Modify")
                Agentname = ""
                AgentID = ""
    If Sheets("MasterID").Range("P2").Value = "" Then Exit For
Next Cell
Set AgMngObj = Nothing
Set cvsApp = Nothing
Set cvsConn = Nothing
Set cvsSrv = Nothing
End Sub

Please Log in or Create an account to join the conversation.

Time to create page: 0.483 seconds
Powered by Kunena Forum