I
I Maycotte
Hi everyone,
My main question is: how do I populate a combobox located in a userfor
with items from an array? I thought I would use .AddItem like I would
listbox, but it simply will not populate. Here is the code:
Code
-------------------
Private Sub ComboBox1_Change()
Dim MyArray As Variant
Dim Ctr As Integer
MyArray = Array("Item1", "Item2", "Item3", "Item4", "Item5")
For Ctr = LBound(MyArray) To UBound(MyArray)
SampleReport.ComboBox1.AddItem MyArray(Ctr)
Next Ctr
End Su
-------------------
Any advice? Thanks in advance.
-- Isaa
My main question is: how do I populate a combobox located in a userfor
with items from an array? I thought I would use .AddItem like I would
listbox, but it simply will not populate. Here is the code:
Code
-------------------
Private Sub ComboBox1_Change()
Dim MyArray As Variant
Dim Ctr As Integer
MyArray = Array("Item1", "Item2", "Item3", "Item4", "Item5")
For Ctr = LBound(MyArray) To UBound(MyArray)
SampleReport.ComboBox1.AddItem MyArray(Ctr)
Next Ctr
End Su
-------------------
Any advice? Thanks in advance.
-- Isaa