LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default Problem displaying a listbox over a combobox

This is a pretty weird one and a little hard to describe ... but I'm going
to try.

My add-in sometimes places a combobox onto the user's worksheet. In
response to a click of an image control also on the worksheet, the code may
dynamically pop-up a listbox on the worksheet. Depending on many factors,
the listbox may get popped up in a location where it overlaps the combobox.

As long as no entry in the combobox is selected (i.e., no entry in the
combobox is highlighted) then everything works fine. However, if one of the
entries in the combobox is selected (i.e., the entry is highlighted) when
the user clicks the image control and the listbox happens to overlap this
combobox, then the rendering of the listbox is messed up. Its almost as if
the combobox entry is bleeding through. If the user first clicks a cell of
the worksheet (thus unselecting the contents of the combobox) before
clicking the image control then everything works fine.

This problem occurs on Excel 97 - 2003.

I've tried programmatically setting the zorder when popping up the listbox
(lstBox.ShapeRange(1).ZOrder msoBringToFront) and that didn't help.

I've tried programmatically selecting a cell on the worksheet to undo the
selection in the combobox (Selection.Select or Selection.Activate) and that
didn't help.

I select and active the listbox (lstBox.Select, lstBox.Activate) and that
doesn't help.

SetFocus doesn't seem to be supported for listbox controls on worksheets.

Argh!

Any suggestions?

TIA,

josh


 
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
Combobox v Listbox MBlake New Users to Excel 5 April 24th 05 11:58 AM
Combobox/listbox FSt1 Excel Discussion (Misc queries) 3 January 4th 05 06:55 PM
ComboBox & ListBox problem unplugs[_19_] Excel Programming 9 June 22nd 04 08:45 AM
Combobox or Listbox Kathy[_7_] Excel Programming 2 December 4th 03 03:48 PM
listbox-combobox category GUS Excel Programming 1 September 12th 03 04:52 PM


All times are GMT +1. The time now is 10:20 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"