Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Combo and List box combination

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 210
Default Combo and List box combination

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

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Combo and List box combination

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" skrev i meddelelsen
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generate a combination list of values XP Excel Programming 3 November 15th 07 03:17 PM
How to get all number combination from a list Tom Ogilvy Excel Programming 1 April 12th 07 11:05 AM
Combination of Validation List and VLOOKUP Problem Blake Excel Worksheet Functions 2 March 23rd 06 08:00 PM
Filtered list for Combo Box ListFillRange - Nested Combo Boxes DoctorG Excel Programming 3 February 23rd 06 12:15 PM
Combination of 2 combo boxes to populate 3rd AJ Excel Programming 2 January 31st 05 10:55 PM


All times are GMT +1. The time now is 11:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"