taxt box properties in user form

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

Leave a Reply

Your are not logged in . Please login to post replies

Click here to Login / Register  

Company
ARTICLESHIP 17 November 2026
Vacancy for Articleship

Promptitude Accounting Services Private limited

Bengaluru

B.Com

View Details
Company
Featured 07 November 2026
Paid Assisstant

DPV & Associates

Chennai

CA Inter

View Details
Company
Featured 29 October 2026
Accounts Executive

Synergy Keystone

Chennai

B.Com

View Details
Company
28 October 2026
Assistant Director/ Associate Director-Finance & Accounting

Krea University

Chennai

CA

View Details
Company
ARTICLESHIP 20 November 2026
Article clerk

Jain Sanjay Kumar & Co

Jaipur

CA Inter

View Details
Company
02 November 2026
Audit Executive

SRJP & Co LLP

Kochi

CA Inter

View Details
Company
Featured 07 November 2026
Chartered Accountant

DPV & Associates

Chennai

CA

View Details
Company
13 November 2026
Chartered Accountant - Fresher

Neeraj Bhagat & Co

New Delhi

CA

View Details