Re: Adding the same content to multiple combo boxes
From: Tom Ogilvy (twogilvy_at_msn.com)
Date: 06/10/04
- Next message: stuart: "VBA search and compare strings"
- Previous message: Tom Ogilvy: "Re: Excel Create Array Variable"
- In reply to: keaven: "Adding the same content to multiple combo boxes"
- Next in thread: anonymous_at_discussions.microsoft.com: "Adding the same content to multiple combo boxes"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 10 Jun 2004 15:45:03 -0400
with Me.ComboBox1
.AddItem "a"
.AddItem "b"
end with
for i = 2 to 6
me.Controls("Combobox" & i).List = Combobox1.List
Next
-- Regards, Tom Ogilvy "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 >
- Next message: stuart: "VBA search and compare strings"
- Previous message: Tom Ogilvy: "Re: Excel Create Array Variable"
- In reply to: keaven: "Adding the same content to multiple combo boxes"
- Next in thread: anonymous_at_discussions.microsoft.com: "Adding the same content to multiple combo boxes"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|