Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA/ActiveX ComboBox autosize bug - Selection of value multiple times shrinks text.

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

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default VBA/ActiveX ComboBox autosize bug - Selection of value multiple times shrinks text.

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.

--

Arris wrote in message ...
Hi,

I've spent a little time adding some verification code into an embedded
excel spreadsheet and one of the things I added were ActiveX Combo
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 I
programmatically provide for the Combo boxes is selected. The default
behaviour of Excel to display this if no value is entered in the next
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 the
autosized Combobox width. It all works fine and I'm happy with the
results of my labour. Just upset now that I find a bug in the autosize
of the objects. If I select values from the ComboBox multiple times it
seems to shrink the text width smaller and smaller even though the
objects have their font set to Arial 7. So I was wondering if anyone
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 large
chunk of code,

Thanks..

Bruce.


---
Message posted from http://www.ExcelForum.com/

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
ComboBox autosize GIP Excel Worksheet Functions 0 August 21st 10 04:50 PM
ActiveX combobox aqualibra Excel Worksheet Functions 1 August 24th 08 07:54 AM
ActiveX Combobox and LinkedCell aqualibra Excel Worksheet Functions 2 August 21st 08 08:36 PM
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
How do i populate a text box according to selection in combobox? Steve Excel Worksheet Functions 0 April 13th 06 12:40 PM


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