![]() |
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 |
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 |
All times are GMT +1. The time now is 12:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com