Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox has 2 rows highlighted
Hello --
A form contains 2 listboxes. Listbox1's MultiSelect property is set to frmMultiSelectSingle. The choice from that listbox is used to populate Listbox2. If the choice in Listbox1 results in Listbox2 having no records, clicking a different choice in Listbox1 highlights both the original choice and the second one. Is there a setting or code I need to add to allow only one choice (or, none) in Listbox 1 to be highlighted? Thanks for any help. Larry Mehl |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox has 2 rows highlighted
It sounds like it's a display problem.
Maybe you could verify it with a line like: MsgBox Me.ListBox1.ListIndex And if maybe you could refresh the user form with a line like: Me.Repaint L Mehl wrote: Hello -- A form contains 2 listboxes. Listbox1's MultiSelect property is set to frmMultiSelectSingle. The choice from that listbox is used to populate Listbox2. If the choice in Listbox1 results in Listbox2 having no records, clicking a different choice in Listbox1 highlights both the original choice and the second one. Is there a setting or code I need to add to allow only one choice (or, none) in Listbox 1 to be highlighted? Thanks for any help. Larry Mehl -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox has 2 rows highlighted
Thanks Dave
"Dave Peterson" wrote in message ... It sounds like it's a display problem. Maybe you could verify it with a line like: MsgBox Me.ListBox1.ListIndex And if maybe you could refresh the user form with a line like: Me.Repaint L Mehl wrote: Hello -- A form contains 2 listboxes. Listbox1's MultiSelect property is set to frmMultiSelectSingle. The choice from that listbox is used to populate Listbox2. If the choice in Listbox1 results in Listbox2 having no records, clicking a different choice in Listbox1 highlights both the original choice and the second one. Is there a setting or code I need to add to allow only one choice (or, none) in Listbox 1 to be highlighted? Thanks for any help. Larry Mehl -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox has 2 rows highlighted
Adding
MsgBox Me.ListBox1.ListIndex at the start of the listbox Click event displays only 1 integer in the msgbox (0,1,2,...) So, the system thinks only one listbox entry is highlighted, when two are highlighted. Me.Repaint has no effect when added at the end of the listbox Click event. Is that where you thought I should put it? Thanks for any additional help. L Mehl "Dave Peterson" wrote in message ... It sounds like it's a display problem. Maybe you could verify it with a line like: MsgBox Me.ListBox1.ListIndex And if maybe you could refresh the user form with a line like: Me.Repaint L Mehl wrote: Hello -- A form contains 2 listboxes. Listbox1's MultiSelect property is set to frmMultiSelectSingle. The choice from that listbox is used to populate Listbox2. If the choice in Listbox1 results in Listbox2 having no records, clicking a different choice in Listbox1 highlights both the original choice and the second one. Is there a setting or code I need to add to allow only one choice (or, none) in Listbox 1 to be highlighted? Thanks for any help. Larry Mehl -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox has 2 rows highlighted
There was a post a little bit ago about a list box showing duplicated values in
the list when scrolling down. I remember that it was a pain to workaround. Maybe you can use some of the code to repopulate the list each time it changes. http://groups.google.com/groups?thre...4738%40msn.com L Mehl wrote: Adding MsgBox Me.ListBox1.ListIndex at the start of the listbox Click event displays only 1 integer in the msgbox (0,1,2,...) So, the system thinks only one listbox entry is highlighted, when two are highlighted. Me.Repaint has no effect when added at the end of the listbox Click event. Is that where you thought I should put it? Thanks for any additional help. L Mehl "Dave Peterson" wrote in message ... It sounds like it's a display problem. Maybe you could verify it with a line like: MsgBox Me.ListBox1.ListIndex And if maybe you could refresh the user form with a line like: Me.Repaint L Mehl wrote: Hello -- A form contains 2 listboxes. Listbox1's MultiSelect property is set to frmMultiSelectSingle. The choice from that listbox is used to populate Listbox2. If the choice in Listbox1 results in Listbox2 having no records, clicking a different choice in Listbox1 highlights both the original choice and the second one. Is there a setting or code I need to add to allow only one choice (or, none) in Listbox 1 to be highlighted? Thanks for any help. Larry Mehl -- Dave Peterson -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox has 2 rows highlighted
Thanks Dave --
I'll check it out. Larry "Dave Peterson" wrote in message ... There was a post a little bit ago about a list box showing duplicated values in the list when scrolling down. I remember that it was a pain to workaround. Maybe you can use some of the code to repopulate the list each time it changes. http://groups.google.com/groups?thre...4738%40msn.com L Mehl wrote: Adding MsgBox Me.ListBox1.ListIndex at the start of the listbox Click event displays only 1 integer in the msgbox (0,1,2,...) So, the system thinks only one listbox entry is highlighted, when two are highlighted. Me.Repaint has no effect when added at the end of the listbox Click event. Is that where you thought I should put it? Thanks for any additional help. L Mehl "Dave Peterson" wrote in message ... It sounds like it's a display problem. Maybe you could verify it with a line like: MsgBox Me.ListBox1.ListIndex And if maybe you could refresh the user form with a line like: Me.Repaint L Mehl wrote: Hello -- A form contains 2 listboxes. Listbox1's MultiSelect property is set to frmMultiSelectSingle. The choice from that listbox is used to populate Listbox2. If the choice in Listbox1 results in Listbox2 having no records, clicking a different choice in Listbox1 highlights both the original choice and the second one. Is there a setting or code I need to add to allow only one choice (or, none) in Listbox 1 to be highlighted? Thanks for any help. Larry Mehl -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Too many rows highlighted | Excel Worksheet Functions | |||
More than selected rows being highlighted | Excel Discussion (Misc queries) | |||
highlighted rows excel | Excel Discussion (Misc queries) | |||
Highlighted rows | Excel Discussion (Misc queries) | |||
Only View Highlighted Rows | Excel Discussion (Misc queries) |