ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Data overrun (https://www.excelbanter.com/excel-programming/381491-re-data-overrun.html)

Debra Dalgleish

Data overrun
 
Using data validation, you can't stop the data entry when the text
length limit is reached. Users can continue typing, and will only see an
error message when they press the Enter key.

If you want to include your email address in your message, you can munge
it. For example, you could use:
Then the address-harvesting robots will have a harder time using it, and
you might not be swamped with spam.

Curt wrote:
useing the following code what is missing to stop input when text data
validation is set. Drops down and continues input. Or can this be stopped?

.Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _
Operator:=xlLessEqual, Formula1:="234"
This is also in macro:
InCellDropdown = False
Thanks
When reply can you tell me if I need to show my e-mail address in post?



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html


Debra Dalgleish

Data overrun
 
You're welcome. If you want to use programming instead of data
validation, you could check the cell after the entry, and ask users to
remove some of the text. Or use a text box from the control toolbox, and
set its MaxLength property.


Curt wrote:
Thank You for the update. Have a error mess in there was trying to make it
fool proof.
Thanks again


"Debra Dalgleish" wrote:


Using data validation, you can't stop the data entry when the text
length limit is reached. Users can continue typing, and will only see an
error message when they press the Enter key.

If you want to include your email address in your message, you can munge
it. For example, you could use:

Then the address-harvesting robots will have a harder time using it, and
you might not be swamped with spam.

Curt wrote:

useing the following code what is missing to stop input when text data
validation is set. Drops down and continues input. Or can this be stopped?

.Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _
Operator:=xlLessEqual, Formula1:="234"
This is also in macro:
InCellDropdown = False
Thanks
When reply can you tell me if I need to show my e-mail address in post?



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 07:44 PM.

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