Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Limit Number Of Characters Allowed In A TextBox
I placed a textbox on my worksheet using the drawing toolbar, and
would like to limit the number of characters that can be entered. As of right now the textbox allows the user to input more characters than it can actually display. Does anyone know how to limit the number of characters to avoid this problem? John |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Limit Number Of Characters Allowed In A TextBox
Use a text box from the Controls toolbox which has a MaxLength property.
NickHK "mastermind" wrote in message ups.com... I placed a textbox on my worksheet using the drawing toolbar, and would like to limit the number of characters that can be entered. As of right now the textbox allows the user to input more characters than it can actually display. Does anyone know how to limit the number of characters to avoid this problem? John |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Limit Number Of Characters Allowed In A TextBox
I understand that the control textbox has the ability to set a maximum
length, but it lacks a number of other formatting features that I would like to keep. I have tried to get the control textbox to look the way I want, but it just doesn't have the flexibility. If I could just get a code a limit for the drawing toolbar textbox it would be perfect. Thanks for your help though. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Limit Number Of Characters Allowed In A TextBox
The problem is that these objects do not have events, so you cannot receive
notification of any changes nor do they have properties (for your purposes) that you can set. You could have a button to run code that checks the length of text entered, but that would only be AFTER the user had finished. maybe use a Rich Text Box instead ? But be awa http://support.microsoft.com/kb/827742 NickHK "mastermind" wrote in message ups.com... I understand that the control textbox has the ability to set a maximum length, but it lacks a number of other formatting features that I would like to keep. I have tried to get the control textbox to look the way I want, but it just doesn't have the flexibility. If I could just get a code a limit for the drawing toolbar textbox it would be perfect. Thanks for your help though. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Limit Number Of Characters Allowed In A TextBox
Code for what? The drawing textbox? You can't attach code to this object and
there is no event you could influence. All you could do is write code for a worksheet event and check your textbox - AFTER the user has input a text beyond your set limit. Then what? Cut the text to the desired length? It will be a messy solution, no comparison to the slick possibilities offered by the control box textbox or even a simple cell with its data validation options. You didn't elaborate on the formatting features that you think are missing with these other solutions. To me the old Forms controls (which I guess MS offers only for backward compatibility) are among the least flexible objects in Excel, so I'm really curious to know which advantage they provide. Joerg "mastermind" wrote in message ups.com... I understand that the control textbox has the ability to set a maximum length, but it lacks a number of other formatting features that I would like to keep. I have tried to get the control textbox to look the way I want, but it just doesn't have the flexibility. If I could just get a code a limit for the drawing toolbar textbox it would be perfect. Thanks for your help though. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
text exceeds allowed number of characters per cell | Excel Worksheet Functions | |||
Is there a limit on characters allowed | Excel Discussion (Misc queries) | |||
Limit the number of characters that a cell contains | Excel Worksheet Functions | |||
a way to limit the characters allowed in a cell? | Excel Worksheet Functions | |||
limit number of characters in a cell | Excel Discussion (Misc queries) |