#  Other Applications & Softwares  > Word Formatting & General >  > [SOLVED] Limiting characters in text box content control

## Exceltrouble

Hi all, is there a good way to limit the number of characters in text box content control? I've been googling all over the place but all the answers were either VBA or just dead ends. 

Word 2010 is under the question.

Thanks in advance!

----------


## 6StringJazzer

The answer is VBA.

How are you using the textbox? What kind of limitation do you want? Is there a reason that you don't want to or can't use VBA?

----------


## Exceltrouble

They describe non VBA solution here: http://superuser.com/questions/80783...soft-word-2010

I fail to follow these steps that are described there. 

Main reason for opting out from VBA is my own poor knowledge of it as well all kinds of problems users tend to run against when using macro based workbooks/documents.

----------


## macropod

You cannot limit the amount of text input into a content control without resorting to VBA. If you need that kind of functionality, you will need to use formfields. Do note, however, that you should not use formfields and content controls in the same document, as they weren't designed to work together, and formfields require Word's 'filling in forms' protection to work.

----------


## Logit

.
.
.
I presume you are using a TextBox on a UserForm ? Refer to the image below:
.
.
MaxLength.jpg
.
.
.
The image refers to the VBA editor. If you are using a UserForm with a TextBox, click on the TextBox then look to the left in the Properties
settings. Locate MaxLength and set the total number of characters you desire.

----------


## macropod

> I presume you are using a TextBox on a UserForm ?



Why would you presume that, when the OP clearly said it's a:




> text box content control?



Content controls and userforms are fundamentally different. For starters, userforms cannot be used without VBA; content controls can...

----------


## 6StringJazzer

You can limit the length if you use a cell with Data Validation (custom formula) instead of a TextBox. Is there any reason you must use a textbox?

At this point it would be helpful for you to attach your file. Under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.

----------


## Exceltrouble

Adding document where example text box content control has been added. Sometimes it is a bit mind boggling that instead having this as standard functionality, you need to engage in VBA. If this is the case of course  :Smilie:

----------


## 6StringJazzer

My mistake, I didn't notice this was in a Word forum; I accessed from the Unanswered Threads list. My answer about using a cell applies only to Excel.

So we are back to VBA for your issue. I have not done this exact thing in Word so would have to develop the solution. I'll be back if I come up with it.

----------


## macropod

> Sometimes it is a bit mind boggling that instead having this as standard functionality, you need to engage in VBA.



As indicated in my previous reply, you can doing without VBA using formfields, but not when using content controls. If you're wedded to using content controls, though, see:
http://gregmaxey.mvps.org/word_tip_p..._controls.html
and, if you want to limit the length of whatever is input into one, see also:
http://gregmaxey.mvps.org/word_tip_p...om_events.html

----------


## Exceltrouble

Thanks guys, I  opt  out from VBA at the moment and simply go with instructional text  :Smilie:

----------

