JaredArchuleta
New Member
- Joined
- May 1, 2023
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
Hello all, I have the following UserForm and would like to only show ListBox results for the employee that is selected.
Here is the current VBA code I am using to populate the list box:
I need help with the code for when I select a name, I only see results for the person selected.
The name of my combobox is: cbxEAName
Thank you all in advance
Here is the current VBA code I am using to populate the list box:
VBA Code:
Sub AnalyzeEmployees()
Dim DataTable As ListObject
Set DataTable = ThisWorkbook.Sheets("Data").ListObjects("records")
Set shData = ThisWorkbook.Sheets("Data")
Dim rng As Range
Set rng = shData.Range("C2:G" & shData.Range("A" & shData.Rows.Count).End(xlUp).Row)
With EmployeeAnalysis.lbxEmployeeResults
.Clear
.ColumnCount = rng.Columns.Count
myArray = rng
.List = myArray
.ColumnWidths = "90;100;100;100;50"
.TopIndex = 0
End With
EmployeeAnalysis.Show
End Sub
I need help with the code for when I select a name, I only see results for the person selected.
The name of my combobox is: cbxEAName
Thank you all in advance