Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Dears, I want to build two Combo Boxes i.e ComboBox1 having range "a1: a50" and ComboBox2 having range "c1:c25". on a same userForm. for a simple single comboBox we use these codes Private sub userForm_activate() Sheet1.activate ComboBox1.columncount=1 Combobox1.rowsource="a1:a50" end sub but i need code to show Combobox2 on the same userForm have range "c1:c25" as well as combobox1 having range "a1:a50". Thanks Syed Haider Ali -- Syed Haider Ali ------------------------------------------------------------------------ Syed Haider Ali's Profile: http://www.excelforum.com/member.php...o&userid=21994 View this thread: http://www.excelforum.com/showthread...hreadid=467474 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This seems too obvious, so I may b e missing something
Private sub userForm_activate() Sheet1.activate ComboBox1.columncount=1 Combobox1.rowsource="a1:a50" ComboBox2.columncount = 1 Combobox2.rowsource = "C1:C25" end sub -- HTH Bob Phillips "Syed Haider Ali" <Syed.Haider.Ali.1vco2c_1126703136.4879@excelfor um-nospam.com wrote in message news:Syed.Haider.Ali.1vco2c_1126703136.4879@excelf orum-nospam.com... Hi Dears, I want to build two Combo Boxes i.e ComboBox1 having range "a1: a50" and ComboBox2 having range "c1:c25". on a same userForm. for a simple single comboBox we use these codes Private sub userForm_activate() Sheet1.activate ComboBox1.columncount=1 Combobox1.rowsource="a1:a50" end sub but i need code to show Combobox2 on the same userForm have range "c1:c25" as well as combobox1 having range "a1:a50". Thanks Syed Haider Ali -- Syed Haider Ali ------------------------------------------------------------------------ Syed Haider Ali's Profile: http://www.excelforum.com/member.php...o&userid=21994 View this thread: http://www.excelforum.com/showthread...hreadid=467474 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks Bob. I got it. One thing more can we set a default value at combobox whenever we run a userForm. Thanks Syed Haider Ali -- Syed Haider Ali ------------------------------------------------------------------------ Syed Haider Ali's Profile: http://www.excelforum.com/member.php...o&userid=21994 View this thread: http://www.excelforum.com/showthread...hreadid=467474 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can set an item to show as selected if that is what you mean by setting
the value of ListIndex. -- HTH Bob Phillips "Syed Haider Ali" <Syed.Haider.Ali.1vcz6t_1126717532.0969@excelfor um-nospam.com wrote in message news:Syed.Haider.Ali.1vcz6t_1126717532.0969@excelf orum-nospam.com... Thanks Bob. I got it. One thing more can we set a default value at combobox whenever we run a userForm. Thanks Syed Haider Ali -- Syed Haider Ali ------------------------------------------------------------------------ Syed Haider Ali's Profile: http://www.excelforum.com/member.php...o&userid=21994 View this thread: http://www.excelforum.com/showthread...hreadid=467474 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Can you explain more in detail with the help of codes Thanks Syed Haider Ali -- Syed Haider Ali ------------------------------------------------------------------------ Syed Haider Ali's Profile: http://www.excelforum.com/member.php...o&userid=21994 View this thread: http://www.excelforum.com/showthread...hreadid=467474 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Combobox1.ListIndex = 2
will select the third item. -- HTH Bob Phillips "Syed Haider Ali" <Syed.Haider.Ali.1ved6i_1126782329.4465@excelfor um-nospam.com wrote in message news:Syed.Haider.Ali.1ved6i_1126782329.4465@excelf orum-nospam.com... Can you explain more in detail with the help of codes Thanks Syed Haider Ali -- Syed Haider Ali ------------------------------------------------------------------------ Syed Haider Ali's Profile: http://www.excelforum.com/member.php...o&userid=21994 View this thread: http://www.excelforum.com/showthread...hreadid=467474 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
fill combobox depending on selection from another combobox | Excel Discussion (Misc queries) | |||
How Do I Load A ComboBox RowSource From The Results Of Another ComboBox | Excel Programming | |||
Populating combobox from another combobox | Excel Programming | |||
VBA ComboBox | Excel Programming | |||
Combobox | Excel Programming |