BryanPayne
New Member
- Joined
- Feb 19, 2018
- Messages
- 3
Hello everyone!
I have been asked to take a stab at creating a small GUI to look up data vs. Filtering data in excel. The reason I am doing it this way is because I will be summing totals as I click on certain people.
I created a drop-down box (cboSupervisor).
Once I click on a name in the drop-down box, i am needing it to populate the List box (lbManager) with all of the managers that fall under that specific manager.
The supervisor data resides in column E2:E2000. The Managers are listed in column F2:F2000.
I have the Supervisors populating the drop-down list on userform_initialize. The Supervisors name is duplicated so I am removing the duplicates. I havent been able to alphabetize the names either.
ex.
Private Sub UserForm_Initialize()
With Sheets("HoursDetailDateRangeExport").Range("e2:e2000")
v = .Value
End With
With CreateObject("scripting.dictionary")
.comparemode = 1
For Each e In v
If Not .exists(e) Then .Add e, Nothing
Next
If .Count Then Me.cboSupervisor.List = Application.Transpose(.keys)
End With
End Sub
Hopefully someone can get me going in the right direction.
Thanks in advance!
I have been asked to take a stab at creating a small GUI to look up data vs. Filtering data in excel. The reason I am doing it this way is because I will be summing totals as I click on certain people.
I created a drop-down box (cboSupervisor).
Once I click on a name in the drop-down box, i am needing it to populate the List box (lbManager) with all of the managers that fall under that specific manager.
The supervisor data resides in column E2:E2000. The Managers are listed in column F2:F2000.
I have the Supervisors populating the drop-down list on userform_initialize. The Supervisors name is duplicated so I am removing the duplicates. I havent been able to alphabetize the names either.
ex.
Private Sub UserForm_Initialize()
With Sheets("HoursDetailDateRangeExport").Range("e2:e2000")
v = .Value
End With
With CreateObject("scripting.dictionary")
.comparemode = 1
For Each e In v
If Not .exists(e) Then .Add e, Nothing
Next
If .Count Then Me.cboSupervisor.List = Application.Transpose(.keys)
End With
End Sub
Hopefully someone can get me going in the right direction.
Thanks in advance!