Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Listbox 2 takes the value of Listbox 1
Hi, I have an excel sheet with two listboxes controlled by forms. The
listboxes are populated from different data and when clicked populate information in Sheet1. Listbox1 has 20 rows of data, Listbox2 has 10 rows. When the first listbox pops up I can select any of the entries. If I select row 2 the data is populated in the correct place in sheet1. The second listbox doesn't show up but the data from row 2 of the second list box is automatically populated in the correct place in sheet1. If I run this again and pick row 11 in listbox1 the second list box shows up and everything works correctly. The second listbox appears to be picking up the value from the first listbox and only shows up if that number doesn't correspond to anything. Any ideas on how to fix that? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Listbox 2 takes the value of Listbox 1
Hi,
Excel -- Data Validation -- Create Dependent Lists. Use this URL: http://www.contextures.com/xlDataVal02.html Challa Prabhu "Illya Teideman" wrote: Hi, I have an excel sheet with two listboxes controlled by forms. The listboxes are populated from different data and when clicked populate information in Sheet1. Listbox1 has 20 rows of data, Listbox2 has 10 rows. When the first listbox pops up I can select any of the entries. If I select row 2 the data is populated in the correct place in sheet1. The second listbox doesn't show up but the data from row 2 of the second list box is automatically populated in the correct place in sheet1. If I run this again and pick row 11 in listbox1 the second list box shows up and everything works correctly. The second listbox appears to be picking up the value from the first listbox and only shows up if that number doesn't correspond to anything. Any ideas on how to fix that? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Listbox 2 takes the value of Listbox 1
Thanks for the thought, However I'm using listboxes from forms.
Dropdown lists are unfortunately not suitable for what I am doing. "challa prabhu" wrote: Hi, Excel -- Data Validation -- Create Dependent Lists. Use this URL: http://www.contextures.com/xlDataVal02.html Challa Prabhu "Illya Teideman" wrote: Hi, I have an excel sheet with two listboxes controlled by forms. The listboxes are populated from different data and when clicked populate information in Sheet1. Listbox1 has 20 rows of data, Listbox2 has 10 rows. When the first listbox pops up I can select any of the entries. If I select row 2 the data is populated in the correct place in sheet1. The second listbox doesn't show up but the data from row 2 of the second list box is automatically populated in the correct place in sheet1. If I run this again and pick row 11 in listbox1 the second list box shows up and everything works correctly. The second listbox appears to be picking up the value from the first listbox and only shows up if that number doesn't correspond to anything. Any ideas on how to fix that? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Listbox 2 takes the value of Listbox 1
I have found a workaround. By putting a message box at the end of listbox2
everything works correctly. The extra click seems to stop the next listbox from running automatically. I still have no idea why this is happening so any further ideas would be greatfully received. (At least I have a quick and dirty workaround for now) --Listbox1 Private Sub ListBox1_Click() ActiveSheet.Range("B2") = ListBox1.List(ListBox1.Value, 0) & " " & ListBox1.List(ListBox1.Value, 1) MsgBox "test" Unload Me End Sub --Listbox2 Private Sub ListBox2_Click() ActiveSheet.Range("B3") = ListBox1.List(ListBox1.Value, 0) & " " & ListBox1.List(ListBox1.Value, 1) Unload Me End Sub "Illya Teideman" wrote: Hi, I have an excel sheet with two listboxes controlled by forms. The listboxes are populated from different data and when clicked populate information in Sheet1. Listbox1 has 20 rows of data, Listbox2 has 10 rows. When the first listbox pops up I can select any of the entries. If I select row 2 the data is populated in the correct place in sheet1. The second listbox doesn't show up but the data from row 2 of the second list box is automatically populated in the correct place in sheet1. If I run this again and pick row 11 in listbox1 the second list box shows up and everything works correctly. The second listbox appears to be picking up the value from the first listbox and only shows up if that number doesn't correspond to anything. Any ideas on how to fix that? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
listbox B conditional of input in Listbox A | Excel Discussion (Misc queries) | |||
Listbox B if LIstbox A equals | Excel Discussion (Misc queries) | |||
MSOffice Excel 2003-Validation Listbox takes only 47 values | Excel Worksheet Functions | |||
Listbox | Excel Discussion (Misc queries) | |||
ListBox (maybe?) ... If so, how? | Excel Discussion (Misc queries) |