ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Text box max length (https://www.excelbanter.com/excel-discussion-misc-queries/101345-text-box-max-length.html)

eb1mom

Text box max length
 
After Max length in a cell is reached, is there anyway to make excel
automatically tab to the next cell down and allow data entry to continue?
Thanks

raypayette

Text box max length
 

You could do this if you used a form to enter the data and every
keystroke was monitored.
However the best you can do is to have this code in the sheet (or
worksheet)module:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
l = Len(ActiveCell.Text)
r = ActiveCell.Row
c = ActiveCell.Column
If l 255 Then
Cells(r + 1, c).Select
End If
End Sub
Unfortunately the data has to be entered before changing cells, the
excess of 255 characters will still be ignored and you won't be able to
edit that cell anymore!
Bad luck!


--
raypayette


------------------------------------------------------------------------
raypayette's Profile: http://www.excelforum.com/member.php...o&userid=29569
View this thread: http://www.excelforum.com/showthread...hreadid=565026


eb1mom

Text box max length
 
Thank-you that will help me get things sorted out. eb1mom




All times are GMT +1. The time now is 02:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com