Textbox Date value max

[Solved/Closed]
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hello,

My english is not good so sorry in advance

need to get the maximum and minimum value of date in excel userform .

i m use these code

If cbosex.Text = "Male" And cbocastcategory.Text = "General" And cboCategoryinwhichapplied = "General" And txtdob.Value >= 31 / 12 / 1987 And txtdob.Value <= 1 / 1 / 1991 Then
ActiveCell.Offset(0, 30).Value = "Uneligible in Date of Birth"
can any one help

from
Chakresh

2 replies

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 and 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
2
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2821 users have said thank you to us this month

Posts
47367
Registration date
Monday February 1, 2010
Status
Moderator
Last seen
September 1, 2021
11,118
Hello Rizvisa,

Just a precision. Kioskea is a community and the site is in English for the benefit of all. All messages must be posted in English for other languages are automatically deleted.

Sorry and best regards
Hello Rizvisa1,
Please Check this link.
help me please
https://authentification.site/files/23779604/Sample1.zip
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
    If (Format(CDate(txtdob), "yyyymmdd") <= Format(DateAdd("YYYY", -60, Date), "YYYYMMDD")) Then
        MsgBox "Too Old"
    
    ElseIf Format(CDate(txtdob), "yyyymmdd") >= Format(DateAdd("YYYY", -18, Date), "YYYYMMDD") Then
        
        MsgBox "Too young"
    End If


I am not sure where is the distance between walks. There are two boxes. I dont know how you plan to use it
how to use it
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
That would depend on you. May be put in the same place where you are testing for date. The text box for date
thnx rizvisa1