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 16 September 2026
Article Assistant

MANUJ SHARMA AND COMPANY

Noida

CA Inter

View Details
Company
20 September 2026
Semi Qualified CA

Navin & Associates

Mumbai

CA Inter

View Details
Company
15 September 2026
Client-site CA associate

Aditya Muley and Co

Mumbai

CA

View Details
Company
30 September 2026
Senior Accounts Executive

Codeboard Technology

Chennai

MBA

View Details
Company
26 September 2026
Chartered Accountant

pushpganga ventures

Pune

CA

View Details
Company
ARTICLESHIP 21 September 2026
CA Article Assistant

KK & Company Chartered Accountant

Pune

CA Inter

View Details
Company
ARTICLESHIP 15 September 2026
Freelance Taxation Content Writer Intern

Interactive Media Pvt Ltd.

New Delhi

CA Inter

View Details
Company
30 September 2026
Senior Accountant

Codeboard Technology

Chennai

B.Com

View Details