taxt box properties in user form

1284 views 1 replies

can some one tell me how to specify properties of input by user in a text box used in user form ? I want to specify, say only dates or a PAN number. I want the user to receive error message if he feeds something else.

Replies (1)
to restrict textbox entry to date use following code Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) If TextBox1 = vbNullString Then Exit Sub If IsDate(TextBox1) Then TextBox1.Value = Format(TextBox1.Value, "MM / DD / YYYY") Else MsgBox "Please Enter Date " TextBox1 = vbNullString End If End Sub


CCI Pro

Leave a Reply

Your are not logged in . Please login to post replies

Click here to Login / Register  

Company
27 May 2026
Audit Assitant

Virender K Gupta and Co

New Delhi

B.Com

View Details
Company
19 June 2026
Accounts Executive

Getfive Advisors Pvt. Ltd.

Ahmedabad

CA Inter

View Details
Company
ARTICLESHIP 28 May 2026
Accounts, Audit & Compliance Executive

Shyam Joshi & Associates

Pune

B.Com

View Details
Company
ARTICLESHIP 09 June 2026
Article Trainee

Numbertree LLP

Mumbai

CA Inter

View Details
Company
Featured 28 May 2026
SEMI QUALIFIED/ CA DROPOUTS/ ARTICLES

T R SOOD & CO

New Delhi

CA Inter

View Details
Company
09 June 2026
Accounts Associate

S Madan and CO

New Delhi

Graduate (Any)

View Details
Company
22 June 2026
Finance Manager- Chartered Accountant

Triveni Turbine Limited

Bengaluru

CA

View Details
Company
12 June 2026
Accounts & Taxation Executive

Winshine Financial Services

Mumbai

CA Inter

View Details