quick62silver
IS-IT--Management
I am new to using the combobox. All of the comboboxes are in the same column and each have the same four items to select. I am not using a Userform. I want to use VBA to populate the multiple comboboxes. I do not want to specify each combobox individually as follows
ComboBox1.AddItem "Item 1"
ComboBox1.AddItem "Item 2"
ComboBox1.AddItem "Item 3"
ComboBox1.AddItem "Item 4"
ComboBox2.AddItem "Item 1"
ComboBox2.AddItem "Item 2"
ComboBox2.AddItem "Item 3"
ComboBox2.AddItem "Item 4"
...
ComboBoxN.AddItem "Item 1"
ComboBoxN.AddItem "Item 2"
ComboBoxN.AddItem "Item 3"
ComboBoxN.AddItem "Item 4"
Is there a way to populate all of the comboboxes in a loop instead of specifying them like above?
Please advise.
ComboBox1.AddItem "Item 1"
ComboBox1.AddItem "Item 2"
ComboBox1.AddItem "Item 3"
ComboBox1.AddItem "Item 4"
ComboBox2.AddItem "Item 1"
ComboBox2.AddItem "Item 2"
ComboBox2.AddItem "Item 3"
ComboBox2.AddItem "Item 4"
...
ComboBoxN.AddItem "Item 1"
ComboBoxN.AddItem "Item 2"
ComboBoxN.AddItem "Item 3"
ComboBoxN.AddItem "Item 4"
Is there a way to populate all of the comboboxes in a loop instead of specifying them like above?
Please advise.