Re: Adding the same content to multiple combo boxes

From: Chip Pearson (chip_at_cpearson.com)
Date: 06/10/04


Date: Thu, 10 Jun 2004 14:04:31 -0500

Keaven,

Load up combobox 1, and then set the List property of each of the
other comboboxes to the List property of combobox 1.

-- 
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"keaven" <kfreeman@nas.edi> wrote in message
news:1add801c44f19$b35b2c50$a401280a@phx.gbl...
> Okay.. here's the deal, i have a user form in excel that
> gathers information. In one section there is a series of
> six combo boxes.  What i have been trying to do is have
> code in the UserForm_Initialize() sub that adds items to
> the combo boxes.  All six combo boxes need the same
> information added to them.
>
> what i would like to do is something like:
>    for each X in (1,2,3,4,5,6)
>       with Me.ComboBoxX
>          .AddItem "a"
>          .AddItem "b"
>       end with
>    next
>
> trying to get it to go through all 6 boxes.. but this is
> not working and i cant figure out how to get it to work
> without reapeating the .AddItem list for each and every
> box.  is there a faster way to do it?
>
> -keaven
>


Relevant Pages

  • Re: Searching Through ComboBoxes
    ... The name of the combobox is PARID. ... combo boxes are linked to a table which is named Project_Inventory. ... ' This is where you add the code to create the resultset ... Don't forget to add code to close the database object db and the ...
    (microsoft.public.access.formscoding)
  • Re: Searching Through ComboBoxes
    ... The name of the combobox is PARID. ... combo boxes are linked to a table which is named Project_Inventory. ... This is easy for a programmer, but not so easy if you haven't ... ' This is where you add the code to create the resultset ...
    (microsoft.public.access.formscoding)
  • Re: Combo Box
    ... Simply make the other three controls text boxes; ... four synchronized comboboxes, I think you could just bind the first combobox ... reason code, but any more than 2 and it doesn't work. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Need entered value added to list
    ... Did I mention that the combobox 'autofills' an unbound text box on the ... Data is entered into two text boxes. ... ID Number and how do I get these two values (newly entered Employee ...
    (microsoft.public.access.formscoding)
  • Re: Initializing Multiple Combo Boxes
    ... You no longer have your ComboBox'es on a UserForm? ... combobox properties for list range shows only a range of cells, ... > Right now I have a form with two currency combo boxes and I separately ... For Each oCtrl In Controls ...
    (microsoft.public.excel.programming)