Set Combo Box Column Width for global app

  • Thread starter Thread starter Bill Sturdevant
  • Start date Start date
B

Bill Sturdevant

I use the following code to successfully adjust the column
widths of a combo box in my App.

This works in the US:
Me.ComboBox.ColumnWidths = "0 in;2 in;0 in;0 in"
OR
Me.ComboBox.ColumnWidths = "0 cm;3.81 cm;0 cm;0 cm"
BUT this does not work:
Me.ComboBox.ColumnWidths = "0;2;0;0"

When I run the code in Germany, none of the above works!

This app has to be global!

What unit of measurement can I use to ensure the code
works anywhere in the world?
 
Hi Bill,

try it with
Me.ComboBox.ColumnWidths = "0;2161;0;0"
It is easier if you don't use "cm" or "in", but Twips.
1,440 Twips is equal to 2.54 cm oder 1 inch.

So your last try did work, but the column was very small,
only 2 twips!
The easiest way to get the number of twips is to input the
values
in the design view, mark the combo and change to the VBA-
Editor.
There the corresponding values are shown in Twips.
 
Back
Top