Dim AgentDisp Sub Window_OnLoad N = 100 For i = 1 to N Set AgentDisp = GetObject("","AgentDisp.AgentDispatcher") If not(AgentDisp Is Nothing) then i = N+1 Next AgentDisp.PopulateFields window.Focus End Sub Sub Window_OnBeforeUnload AgentDisp.UpdateRecord End Sub Sub DispositionCall(CallResultCode) AgentDisp.DispositionCall CallResultCode End Sub Sub ChangePage(PageName) AgentDisp.ChangePage PageName, False End Sub Sub ChangePageAndRecord(PageName) AgentDisp.ChangePage PageName, True End Sub