asyamonique
Well-known Member
- Joined
- Jan 29, 2008
- Messages
- 1,286
- Office Version
- 2013
- Platform
- Windows
Good Day,
Given below code is populating my datas correctly on a userform.
So far there is no any issue with that.
I like to put an additional function into that code if its possible I like to add one ComboBox which will be loaded base on columnA datas (its all employee names) and list boxes will be show only base on the selected combobox data.
ListBox6 shows datas
ListBox7 i use it as header.
Thanks.
Given below code is populating my datas correctly on a userform.
So far there is no any issue with that.
I like to put an additional function into that code if its possible I like to add one ComboBox which will be loaded base on columnA datas (its all employee names) and list boxes will be show only base on the selected combobox data.
ListBox6 shows datas
ListBox7 i use it as header.
Thanks.
VBA Code:
Application.ScreenUpdating = False
Dim re As Range, J As Long, jj As Long
Dim rng As Range, b As Variant
Set rng = Sheets("EVA").Range("a:a").CurrentRegion.Resize(, 43)
b = rng.Resize(1)
Set rng = rng.Offset(1).Resize(rng.Rows.Count - 1)
With rng
ReDim a(1 To .Rows.Count, 1 To 43)
For J = 1 To .Rows.Count
For jj = 1 To .Columns.Count
a(J, jj) = .Cells(J, jj).Text
Next
Next
End With
With ListBox6
.ColumnCount = 43
.ColumnWidths = "170;90;90;0;220;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;90;110;85;100;90;90;0"
End With
With ListBox7
.ColumnCount = 43
.ColumnWidths = "160;90;100;0;190;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;80;120;100;90;80;80;0"
End With
Me.ListBox6.list = a
Me.ListBox7.list = b
Application.ScreenUpdating = True