Hi all,
I have several user forms and i'm trying to fill in a listbox with items upon opening with the following code:
T_Active is a table and exists with 2 columns:
- ID
- Name
This code worked perfectly for another form I used to show the suppliers, which works fine.
When I try to run this one, it gives me an empty listbox
Anyone an idea where I need to look?
Thanks
Céline
I have several user forms and i'm trying to fill in a listbox with items upon opening with the following code:
Code:
Private Sub Frm_Offer_Initialize()
Dim Client As Range
Dim i As Integer
'Fill listbox with possible clients
For Each Client In Range("T_Active[Name]")
With Me.LstB_Clients
.AddItem
.List(i, 0) = Client.Value
.List(i, 1) = Client.Offset(0, -1).Value
i = i + 1
End With
Next Client
End Sub
T_Active is a table and exists with 2 columns:
- ID
- Name
This code worked perfectly for another form I used to show the suppliers, which works fine.
When I try to run this one, it gives me an empty listbox
Anyone an idea where I need to look?
Thanks
Céline