Dear Team,
Appreciate all your valuable support
i am sharing thee original file with dummy data to summarize my query
File Attached
the file is very complicated and i am not able to find a solution as its very difficult
Workbook has 5 sheets
Main is the main page
Raw contains employee performance data
Working contains targets and scores
piv is a pivot of Raw
Submission is the place where all data will be updated
I have created Piv sheet to create ranges for Combo box, but didnt work
How it works
every week, I get data for employees performance, which i fill in Raw data.
the file is then forwarded to Manager, where they discuss the same with employees
on Main sheet, there is a button to select employee
So the Manager will click on the button to select agent name
Agent name is userform to search for emp
1 option is to search using filters and other is to search using typing employee names
There is a radio button to select the method
option 1 : Search by filters.
Manager will click on radio button and select
Search by filters.
At this point, they can select the manager name from Combo box and then
select the employee name,
then click on Select button
(("Manager and employee names are filtered via Raw sheet Column E"))
As soon as they click on select, the information is passed down to H16 and all employee related performance is displayed using Index match
option 2 : Search by typing
This is an easy option, just type few initials of employee and it gets displayed using listbox.
I used below code for searching using typing
Code:
Private Sub TextBox3_Change()
Dim i As Long
Me.TextBox3.Text = StrConv(Me.TextBox3.Text, vbProperCase)
Me.ListBox1.Clear
For i = 2 To Application.WorksheetFunction.CountA(Sheet2.Range("D:D"))
a = Len(Me.TextBox3.Text)
If Left(Sheet2.Cells(i, 4).Value, a) = Left(Me.TextBox3.Text, a) Then
Me.ListBox1.AddItem Sheet2.Cells(i, 4).Value
Me.ListBox1.List(ListBox1.ListCount - 1, 1) = Sheet2.Cells(i, 5).Value
End If
Next i
End Sub
and used this code to useform initialize for combobox
Code:
Private Sub UserForm_Initialize()
Me.ComboBox1.RowSource = Range("Manager")
End Sub
I am unable to use the Combobox, please help