VBA/ActiveX ComboBox autosize bug - Selection of value multiple times shrinks text.

A

Arris

Hi,

I've spent a little time adding some verification code into an embedde
excel spreadsheet and one of the things I added were ActiveX Comb
boxes linked to cells, and positioned them over the top of the cells
Now this is fine until one of the long entries from the list
programmatically provide for the Combo boxes is selected. The defaul
behaviour of Excel to display this if no value is entered in the nex
column, is to show the value over part of the adjoining cell.

So I put code in the Combobox_Change() event to size the column to th
autosized Combobox width. It all works fine and I'm happy with th
results of my labour. Just upset now that I find a bug in the autosiz
of the objects. If I select values from the ComboBox multiple times i
seems to shrink the text width smaller and smaller even though th
objects have their font set to Arial 7. So I was wondering if anyon
had developed a fix or even a work around for this bug???

Please help if you can, it will save me from having to scrap a larg
chunk of code,

Thanks..

Bruce
 
O

onedaywhen

I don't know if this is relevant, but I've recently noticed shrinking
font in a textbox in one of my apps. It seems that if the textbox is
fractionally too small to accommodate the text, the font shrinks to
accommodate. I've made no attempted to find out why this happens
because it works in my favor! So my suggestion to you is to try
increasing the size of the column and/or control a bit larger than the
AutoSize size.

BTW is the combobox on a worksheet? I've seen a similar bug where the
combobox itself doubled in size each time it was dropped down. I used
an event to resize it back to normal and I *think* this resulted in
the font shrinking instead. However, this bug only occurs when the
screen resolution is changed (e.g. via Control Panel, Display,
Settings, Screen Resolution) while the workbook is open.
 

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

Top