• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

allow intranet button click trigger start/stop stop watch macro

have-a-go-green

New Member
Hi


I have a working stop watch that i use to keep track of hold time, for individual users in a call centre. It works by working out the average against the total calls taken. The problem is that it is too easy to forget to either start or stop the timer, while dealing with difficult calls etc. What i would like to acheive, is, linking the actual hold button that the advisor has to press to place the customer on hold, to my macro. the "softphone" is a html intranet page that all the calling features are based on, including the all important hold button.


Is this at all possible?
 
Hi ,


How are you putting in the data in Excel ? Are you manually noting down the hold time , and then entering it in Excel ?


Can your browser not use Javascript ( within your intranet softphone page ) to activate a timer when the HOLD button is clicked , deactivate it when the button is released , and enter the HOLD time in an Excel worksheet opened using Javascript from within your browser ?


Narayan
 
Hi,


I know nothing about javascript :(


hopefully the code below will show up on this post and show you what i have so far.


The softphone that is being used, already controls all the stats in the background, but, because there are thousands of advisors that have to be monitored, we dont get "real time" stats.That often means that if your already having a bad day and feel that you wouldnt be able to improve your stats, its too easy to give up. Ive been testing out my hold timer for around a week now and ive been able to manage my own hold time sucessfully every day, whereas, normally i would only hit target, maybe one out of every 3 days. As mentioned in my original question, however, its very difficult to remember to press the hold button to start and then stop the hold timer.


If there is a way to link the macro to be triggered when the softphone hold button is pressed, that would solve my problem. That way, the only thing the advisor would have to do is make sure that the "calls taken" spin button matches the actual calls taken, which then provide and 100% accurate real time view of the hold time.


(Dim CountDown As Date


Sub Timer()

DisableTimer

CountDown = Now + TimeValue("00:00:01")

Application.OnTime CountDown, "Reset"

End Sub


Sub Reset()

Dim Counter As Range

Application.ScreenUpdating = False

Application.EnableEvents = False


If Evaluate("COUNT(F5)") = 0 Then

Call DisableTimer

Else

For Each Counter In ThisWorkbook.Sheets("Sheet1").Range("F5")

If Not IsEmpty(Counter) Then Counter = Counter + TimeValue("00:00:01")

Next Counter

Call Timer

End If


Application.ScreenUpdating = True

Application.EnableEvents = True

End Sub


Sub DisableTimer()

On Error Resume Next


Application.OnTime EarliestTime:=CountDown, Procedure:="Reset", Schedule:=False


End Sub)
 
Hi ,


From what I understand , you have your softphone application as a web page ( or an intranet page , if you will ) running in your browser ; on the same PC , you also have an Excel worksheet , which contains the VBA procedure you have posted.


The HOLD button is in your softphone application , which means it is from within your browser ; so when it is clicked , the communication should be initiated by your softphone application / whatever script is running in your browser.


Excel is only a recipient ; so it is essential that you are able to access your Excel worksheet from within your softphone / browser script than the other way around.


Narayan
 
Hi Narayan,


thanks for your time so far on this.


I think my inexperience in vba is now showing, as, im unsure what you mean. are you saying that this cant be done?
 
Hi ,


I think that since the HOLD button is in your softphone application , what you want to be done i.e. the pressing and releasing of the HOLD button should be registered , has to done from within your softphone application.


I do not know the language in which this has been developed ; since you said HTML , I just guessed that Javascript would be one way of doing this.


Excel is involved only to the extent that the times at which the button is pressed / released are recorded ; I think the proper way would be for your softphone application to talk to Excel rather than Excel continuously monitoring your softphone application to find out whether the button has been pressed / released. This could also be done , but I have no idea how.


Narayan
 
Hi,


well, im open to other suggestions, on how to achieve my goal. Is there a different way this could be done?, would javascript be the answer?. My other thought, was to set my worksheet, to always be ontop of al other open pages... although, this, i feel, would be somewhat of an anticlimax, to my airbrained idea, i could also do with some help on how to achieve this.


Thanks again for your input, so far, i really do appreciate it.
 
-EDIT-


Ive found sound beautiful code that sorts out my "allways on top" option, that even enables the user to switch the option off.


(Option Explicit


Declare Function SetWindowPos Lib "user32" _

(ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _

ByVal X As Long, ByVal Y As Long, ByVal cx As Long, _

ByVal cy As Long, ByVal uFlags As Long) As Long


Private Declare Function FindWindow Lib "user32" _

Alias "FindWindowA" (ByVal lpClassName As String, _

ByVal lpWindowName As String) As Long


Const HWND_TOPMOST = -1

Const HWND_NOTOPMOST = -2


Sub AlwaysOnTop()


Dim hwnd As Long

Dim res As Long


hwnd = FindWindow("XLMAIN", vbNullString)

res = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, vbNull)


End Sub


Sub NotAlwaysOnTop()


Dim hwnd As Long

Dim res As Long


hwnd = FindWindow("XLMAIN", vbNullString)

res = SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, vbNull)


End Sub)
 
Hi, have-a-go-green! (preparing for St. Patrick's day?)

I've recently read this topic and here are my first two-cents:

a) I agree with NARAYANK991 that the ideal situation would be making your softphone program to interact directly with Excel, what if it isn't possible directly it sure should be writing on a journal/log/text file which can be supervised by Excel at regular intervals using a timer implementation or triggered events handling

b) I used many times code like the previous for bringing on top windows and sending them back after user interaction, that isn't tricky at all, but you should invert the precedence about relevant software, and relay on Excel to do the hard job instead of your softphone

c) In any case, I'd firstly talk with the IT department / consultant / company that sold/develop/maintain the softphone app and told them what you posted here, explain what do you want to achieve, and hear what do they have to say

d) After that, I'll seriously consider to either include all within softphone software and let Excel import data to perform analysis or stats -a priori my first choice-, or evaluate developing an Excel platform that does all the dirty job, and keep the softphone software as a complement or a redundant check control.

Keep on thinking, and share your ideas, perhaps we can find out the better way.

Regards!
 
Back
Top