Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default 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
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
Too many rows highlighted RLD Excel Worksheet Functions 1 March 24th 10 04:33 PM
More than selected rows being highlighted RLD Excel Discussion (Misc queries) 2 March 17th 10 07:03 AM
highlighted rows excel Nick Excel Discussion (Misc queries) 1 May 19th 09 07:00 PM
Highlighted rows Reyes Excel Discussion (Misc queries) 2 November 13th 08 06:58 PM
Only View Highlighted Rows duketter Excel Discussion (Misc queries) 4 October 9th 07 01:57 PM


All times are GMT +1. The time now is 04:31 AM.

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

About Us

"It's about Microsoft Excel"