Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have a number of combo boxes on 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 each combo box, rather, than initializing each combo box on the forms initialize event? -- Carlee |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
So, the errror 'Type mismach 13' is occuring when i click a on my Main Menu UserForm, to open my StockpileDump data entry form, the form to which i am trying to initialize. No control source properties contain any data. Any further suggestions i could test? -- Carlee "Zone" wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Carlee, Post your entire userform_initialize sub and I'll try to
figure out what's wrong. James On Jun 8, 4:04?pm, Carlee wrote: Hi, So, the errror 'Type mismach 13' is occuring when i click a on my Main Menu UserForm, to open my StockpileDump data entry form, the form to which i am trying to initialize. No control source properties contain any data. Any further suggestions i could test? -- Carlee "Zone" wrote: 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- Hide quoted text - - Show quoted text - |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I tried to implement this, i keep getting a 'data mismatch' error. How can i resolve this? -- Carlee "Carlee" wrote: Hello, I have a number of combo boxes on 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 each combo box, rather, than initializing each combo box on the forms initialize event? -- Carlee |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Carlee, it worked fine for me. Did you copy and paste? Are you using
Excel XP (2002 or 2003)? Also, be sure the Control Source property is set to empty. James On Jun 8, 1:28?pm, Carlee wrote: Hi, I tried to implement this, i keep getting a 'data mismatch' error. How can i resolve this? -- Carlee "Carlee" wrote: Hello, I have a number of combo boxes on 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 each combo box, rather, than initializing each combo box on the forms initialize event? -- Carlee- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Getting Combo boxes to change options based on other Combo boxes. | New Users to Excel | |||
multiple combo boxes | Excel Discussion (Misc queries) | |||
multiple combo boxes | Excel Discussion (Misc queries) | |||
Linking multiple combo boxes | Excel Programming | |||
Checking values already in combo boxes | Excel Programming |