Good morning,
I have a call list for the agents in our call center and I need to know the date and time they make an outbound call from this list.
Due to the different ways agents enter the date and time in one cell, I have made it very simple for them now.
Select the cell and click the submit button in the userform I have provided. All it has is a SUBMIT button.
When its clicked, it will enter data to the Data worksheet. The current time and date and the agent's name are all collected from the Engine worksheet.
We are using 365 in a Windows 10 environment with some 32 and 64 bit machines.
The problem with my code I will provide below is the same time will be added to the data sheet for several records.
I thought it was working correctly until I found an agent's Data sheet with 150+ calls with the same time indicated.
Can someone please tell me where I'm going wrong?
Thank you
-- g
I have a call list for the agents in our call center and I need to know the date and time they make an outbound call from this list.
Due to the different ways agents enter the date and time in one cell, I have made it very simple for them now.
Select the cell and click the submit button in the userform I have provided. All it has is a SUBMIT button.
When its clicked, it will enter data to the Data worksheet. The current time and date and the agent's name are all collected from the Engine worksheet.
We are using 365 in a Windows 10 environment with some 32 and 64 bit machines.
The problem with my code I will provide below is the same time will be added to the data sheet for several records.
I thought it was working correctly until I found an agent's Data sheet with 150+ calls with the same time indicated.
Can someone please tell me where I'm going wrong?
VBA Code:
Private Sub UserForm_Activate()
'*************************************************
Dim Frmhdl As LongPtr
Dim lStyle As LongPtr
Frmhdl = FindWindow(vbNullString, Me.Caption)
lStyle = GetWindowLong(Frmhdl, GWL_STYLE)
lStyle = lStyle Or WS_SYSMENU
lStyle = lStyle Or WS_MINIMIZEBOX
lStyle = lStyle Or WS_MAXIMIZEBOX
SetWindowLong Frmhdl, GWL_STYLE, (lStyle)
DrawMenuBar Frmhdl
'*************************************************
With ufSample
.Top = Application.Top + 100 '< change 125 to what u want
.Left = Application.Left + 1000 '< change 25 to what u want
.show vbModeless
End With
Call SystemButtonSettings(Me, False)
On Error GoTo 0
Application.UserName = Worksheets("Engine").Range("B6").Value
lbInputDate.Caption = Worksheets("Engine").Range("B1").Value
lbInputTime.Caption = Worksheets("Engine").Range("B2").Value
'Call MyCell
lbUser.Caption = Worksheets("Engine").Range("B6").Value
0
End Sub
Thank you
-- g