ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Data Validation (https://www.excelbanter.com/excel-programming/289587-data-validation.html)

Sandy[_5_]

Data Validation
 
Grettings all!
I have been having problems with users using the space bar to clear the contents. I have used data validation to restrict the value to whole number only. If possible when the users tries to enter alpha or space to clear instead of the standard error message comes up I would like the message to be Sosomething like the value that you have entered is invalid. Press enter to retry or press cancel to clear contents. At this point the code would clear the contents. Where do I start. I have just started learning code and usually just use the macro recorder, but I cant quite figure out how to do this using the recorder.
Thanks in advance
Sandy

Frank Kabel

Data Validation
 
Hi Sandy
you can change the standard error message of data validation in the
dialog. Select the third tab in the dialog and enter your error message

HTH
Frank

Sandy wrote:
Grettings all!
I have been having problems with users using the space bar to clear
the contents. I have used data validation to restrict the value to
whole number only. If possible when the users tries to enter alpha
or space to clear instead of the standard error message comes up I
would like the message to be Sosomething like the value that you have
entered is invalid. Press enter to retry or press cancel to clear
contents. At this point the code would clear the contents. Where do
I start. I have just started learning code and usually just use the
macro recorder, but I cant quite figure out how to do this using the
recorder. Thanks in advance
Sandy




Sandy[_5_]

Data Validation
 
Thanks Frank. That solves part of the problem is there any way to clear contents when cancel is clicked
Thanks again

Frank Kabel

Data Validation
 
Hi Sandy
if I cancel the data validation error my entry is cleared (that is the
previous entry is restored). But maybe I#m missing something in your
question

Frank

Sandy wrote:
Thanks Frank. That solves part of the problem is there any way to
clear contents when cancel is clicked? Thanks again




Frank Kabel

Data Validation
 
Sandy wrote:
Sorry Blonde moment...didnt realize it cleared it
THANKS!


:-)
you're welcome
Frank

Frank Kabel

Data Validation
 
Hi Sandy
A space followed by ENTER is not a valid entry. It is a text (CHAR(32))
so the data validation does not accept it. If you want to remove the
entry just select the cell and hit DEL. This will clear the content
Frank

Sandy wrote:
Still doesnt work like I want it to....User enters a number and later
wants to remove it. Space bar followed by enter bar gives error.
Retry plus enter user can enter another number but doesnt clear, and
cancel defaults back to previous number that was entered. Am I
really that blonde???? Thanks




sandy

Data Validation
 
You and I both understand that. However my users (a bit old school) think that a blank cell is a blank cell. I was just trying to make the validation and clear contents or delete one step. I guess if it cant be done, at least Ill know the ones that keep asking about it are the ones that need intense schooling or a kick one
Thanks

Frank Kabel

Data Validation
 
sandy wrote:
You and I both understand that. However my users (a bit old school)
think that a blank cell is a blank cell. I was just trying to make
the validation and clear contents or delete one step. I guess if it
cant be done, at least Ill know the ones that keep asking about it
are the ones that need intense schooling or a kick one. Thanks


lol (I think the latter one.) Life could be so easy without
customers/users
Regards
Frank



All times are GMT +1. The time now is 06:58 AM.

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