Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
maxlength on textbox
I have a problem with the maxlength in a textbox. I have the maxlength set
to 27 characters. The problem is some characters are wider than others. Some of the strings are wider than the cell that I am putting them in. Is there a way to limit the width of a string not by the number of characters, but the actual width of the string? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
maxlength on textbox
Hi ranswrt
The easiest way would be to store the width of the column the string is to go into as a variable, insert your string into the column, do an autofit of the column width, test whether the new width is less than or equal to the original value, then reset the column width to its original value. If the autofit width was larger tan the original value, the string was too wide. -- Cheers macropod [MVP - Microsoft Word] "ranswrt" wrote in message ... I have a problem with the maxlength in a textbox. I have the maxlength set to 27 characters. The problem is some characters are wider than others. Some of the strings are wider than the cell that I am putting them in. Is there a way to limit the width of a string not by the number of characters, but the actual width of the string? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Textbox from 1st worksheet to textbox to other multiple sheets | Excel Programming | |||
MaxLength Property issues | Excel Programming | |||
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys | Excel Programming | |||
Textbox Bug? Missing/delayed update of textbox filled via VBA | Excel Programming | |||
Textbox Bug? Missing/delayed update of textbox filled via VBA | Excel Programming |