PC Review


Reply
Thread Tools Rate Thread

Combo and List box combination

 
 
Atif
Guest
Posts: n/a
 
      25th Nov 2008
Hi All,

Data is in following arrangement

Col A Col B
1 A B
2 A1 B1
3 A2 B2
4 A3

How can I populate a combo box with A and B (catagory), and display
corresponding values in a List Box.
 
Reply With Quote
 
 
 
 
galimi
Guest
Posts: n/a
 
      25th Nov 2008
Atif,

You have many options. The easiest way through this would be to combine the
values into a third column and use a Form combobox with a list range. You
could also do this programatically with a control combobox and combine the
values into one column or two.
--
http://www.ExcelHelp.us
(E-Mail Removed)
888-MY-ETHER ext. 01781474



"Atif" wrote:

> Hi All,
>
> Data is in following arrangement
>
> Col A Col B
> 1 A B
> 2 A1 B1
> 3 A2 B2
> 4 A3
>
> How can I populate a combo box with A and B (catagory), and display
> corresponding values in a List Box.

 
Reply With Quote
 
Per Jessen
Guest
Posts: n/a
 
      25th Nov 2008
Hi

It can be done like this:

Private Sub ComboBox1_Click()
If Me.ComboBox1.Value = Range("A1").Value Then
Me.ListBox1.RowSource = "A2:A4"
ElseIf Me.ComboBox1.Value = Range("B1").Value Then
Me.ListBox1.RowSource = "B2:B4"
End If

End Sub
Private Sub UserForm_Initialize()
Me.ComboBox1.AddItem Range("A1").Value
Me.ComboBox1.AddItem Range("B1").Value
End Sub

Regards,
Per


"Atif" <(E-Mail Removed)> skrev i meddelelsen
news:A61F7000-DF35-4B69-B37A-(E-Mail Removed)...
> Hi All,
>
> Data is in following arrangement
>
> Col A Col B
> 1 A B
> 2 A1 B1
> 3 A2 B2
> 4 A3
>
> How can I populate a combo box with A and B (catagory), and display
> corresponding values in a List Box.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo and List Box Combination =?Utf-8?B?TmFuZXR0ZQ==?= Microsoft Access Form Coding 1 6th Feb 2007 08:38 PM
Re: Text Box/Combo Box combination control? Bill Mosca, MS Access MVP Microsoft Access 0 1st Dec 2006 07:58 PM
Re: Text Box/Combo Box combination control? Roger Carlson Microsoft Access 0 1st Dec 2006 07:42 PM
Combination of 2 combo boxes to populate 3rd =?Utf-8?B?QUo=?= Microsoft Excel Programming 2 31st Jan 2005 10:55 PM
Update a combo box using a key combination Jen Microsoft Access Form Coding 1 23rd Mar 2004 01:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:43 PM.