ComboBox Scrolling

  • Thread starter Thread starter Pete
  • Start date Start date
P

Pete

I am having trouble with a combobox on an Excel worksheet. Since I
want to display dates (in date format), I populate the list from VBA.
However, the first time the user clicks on the combobox after it is
populated, the entire list is crammed into the top row of the
dropdown, with a spinner or a 1-row scrollbar allowing choices. The
rest of the dropdown is blank. After the first click on the combobox,
it behaves nicely.

Has anyone seen anything like this? Any ideas?

Thanks.
 
Pete
You'll need to show the code you are using to populate and control the box
in question for further advice
Cheers
Nigel
 
Control Toolbox ComboBoxes when used on worksheets are very buggy. Can you
work with a ComboBox from the Forms Toolbar (less flexible but more stable)?
 
The populate code goes like this:
....
cb.Clear
cb.AddItem "My heading"
For i = 1 to ItemRange.Rows.Count
cb.AddItem Format(ItemRange.Cells(i, 1).Value, "dd/mm/yyyy")
Next i
cb.ListIndex = 0
....

The underlying data is pretty volatile, so I've been calling it from
the cb_GotFocus event-handler. (I don't know a good place to call from
upon initialization.)

Thanks very much for your attention.
 
Vasant -

I chose the Control Toolbox for 3 reasons:
- (Most important) At runtime, I sometimes need to make the control
invisible. Is there a better way to do this? With Forms Combobox?
- A book I read recommended that we avoid using Forms controls.
- As an option, it wold be nice (not critical) to have access to the
"Shift" parameter of the MouseDown event.

If there are other ways of achieving these features?

Thanks for your attention.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top