limiting rows of text in a textbox object?

M

mark

Hello.

Is there a way to limit the rows of text in a textbox object (placed in a
worksheet, not a form).

The users want to be able to stop a user from entering more than a certain
amount of text. They don't want any error message to appear (as the
Data-Validation does). They just want it to stop accepting text when it
reaches the visual limit of the space.

With a cell, I didn't figure out a way to do this, because there is no
'keydown' event to check text as it is being entered.... only the worksheet
change event after the ENTER key is pressed, or another cell selected.

In the textbox control, there is a 'keydown' event... so live checking can
happen.

I see the character limit property.. but that doesn't do what is needed,
well. For instance, characters are not all the same widty, so even if you
typed across the whole row, the space would be filled with a different number
of characters, depending upon specifically what characters were entered.

What is needed is a count of the rows of text. Is that possible in either a
textbox control, or in a cell itself with wrap text turned on?

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top