If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
List Boxes
Hi All,
How can I make a list box that has a series of values that are based on the values selected in another list box. Example List Box 1 A B C List Box 2: If A is selected from List Box 1, List Box 2 will show A1 A2 A3 or if B is selected B1 B2 B3 or if C is selected C1 C2 C3 this is a very simplistic example. Thanks in Advance |
#2
|
|||
|
|||
for the first listbox enter the following code
Private Sub ListBox1_Click() If ListBox1 = "a" Then ListBox2.ListFillRange = "f21:f22" ElseIf ListBox1 = "b" Then ListBox2.ListFillRange = "g21:g23" Else ListBox2.ListFillRange = "h21:h22" End If End Sub f21:f22 range has a1 and a2 g21:f23 range has b1, b2 and b3 h21:f22 range has c1 and c2 - Mangesh --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
selecting multiple records | sps | Using Forms | 3 | August 3rd, 2004 08:22 PM |
Can List Boxes be used in a Report | Jay | Setting Up & Running Reports | 1 | July 16th, 2004 02:12 AM |
Display Multi-Select Choices from List Boxes with and with VB code | ExecutiveBest | Worksheet Functions | 1 | July 8th, 2004 03:59 AM |
synchronizing form and list box | Deb Smith | Using Forms | 8 | June 21st, 2004 08:15 PM |
Radio Buttons and Dropdown List Boxes | Pat Stellacci | Worksheet Functions | 1 | October 23rd, 2003 09:26 PM |