Date ofbirth between 01/01/1995 to 01/01/2005

Solved/Closed
Report
-
 AKS -
Hello,

I have a userform with a text box name txtdob.
i m trying to do if i add a date in text box between 01/01/1995 to 01/01/2005 then msgbox show "Eligible" and sheet1 collumn A2 "Eligible"
and if date is Before 01/01/1995 then msgbox show " UnEligible " and sheet1 collumn A2" UnEligible " & After 01/01/2005 then msgbox show " Uneligible" and sheet1 collumn A2" UnEligible "
please help me

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
Could you please upload a sample EXCEL file WITH sample data, macro, formula , conditional formatting etc on some shared site like https://authentification.site , http://docs.google.com, http://wikisend.com/ , http://www.editgrid.com etc
A N D post back here the link to allow better understanding of how it is now and how you foresee. Based on the sample book, could you re-explain your problem too
thanks it solve my problem
there is another problems i have piease solve it
1- how to set numeric value in text box.
2- in user form i have 02 text boxes with numeric value for example first text box have "81 cm " and second have text box "86 cm" it means in these text boxes i want minimum gap "6 cm" and if these text box have "81" or "85" msgbox Ineligible.
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
for #1
you can test the value if it is numeric or not. The function is "IsNumeric"

for #2
"18 cm" is not numeric. "18" is. So if you have entered "18 cm", then its a text.
You can test if as DOB was tested. Only thing, in this case there does not seem to be any reason to format the numbers
thnx it solve my problem
and no. 2 problem is i says 18 cm but it is only for example
i want if text box 2 text count text box 1 no +6 (any 1 to 999)
like if text box1 have 01 then text box2 count +6 if it is +6 then Ok
if text box1 have 10 then text box2 count +6 if it is +6 then Ok
if text box1 have 99 then text box2 count +6 if it is +6 then Ok and
if text box1 have 01 then text box2 count is not +6 if it is not +6 then False

any no. a add in text box1 then text box 2 count it +6 and give me OK or False
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
sorry did not understand you
rizvisa could u pls solve my this problem
chk this link
https://authentification.site/files/24174814/New_Member.zip
thanks in advance