Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / May 2006

Tip: Looking for answers? Try searching our database.

limiting rows of text in a textbox object?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mark - 19 May 2006 17:09 GMT
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
mark - 19 May 2006 20:06 GMT
got it.

LineCount  property.

sorry.

don't know why I didn't see it earlier.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.