View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Zone[_3_] Zone[_3_] is offline
external usenet poster
 
Posts: 373
Default Initiating multiple combo boxes with the same values

If you want the same values in each combobox and you want the same
listindex selection for all, something like this should work:

Private Sub UserForm_initialize()
Dim cmb As ComboBox
For Each cmb In Me.Controls
With cmb
.AddItem "a"
.AddItem "b"
.ListIndex = 1
End With
Next cmb
End Sub

James

On Jun 8, 12:41?am, Carlee wrote:
Hello,
I have a number ofcomboboxeson a UserForm all requiring the same values
for hte user to select. Is there an efficient way for me to populate the
select options for eachcombobox, rather, than initializing eachcombobox
on the forms initialize event?

--
Carlee