0% found this document useful (0 votes)
8 views2 pages

Vb5 Formatting Text

Uploaded by

prashant.iron1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Vb5 Formatting Text

Uploaded by

prashant.iron1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

VB 5: Formatting Text

Nnite a program in Visual Basic that accepts Name of the Person, Date of Birth and Telephone
Vumber asdata during execution. The program must check the validity of contents and must display
iàn appropriate error message along with appropriate corrective suggestions if dat is incorrectiy
entered.

Formni

Frame1

Enter the Name Kiara

Enter Birth date 21-08-97

Telephone No. 8106547890

Clear Exit

Private Sub Clear Click()


Text1,Text = ""

Text2,Text = ""

Text3.Text = "

End Sub

Private Sub Exit_Click()


End

End Sub

Private Sub Text1 _validate(Cancel As Boolean)


If Text1.Text = "" Then
MsgBox "Please enter your name",vbinformatio, "Enter Name"
Text1.SetFocus

End If

End Sub

Private Sub Text2 Validate(Cancel As Boolean)


If Text2.Text = "" Then
"Enter Birthdate"
MsgBox "Please Enter your Birthdate", vblnformation,
Text2.SetFocus

End If

End Sub

Private Sub Text3 Validate(CancelAs Boolean)


If Text3.Text = "" Then
vbinformation, "Enter 10 Digit mobile Number"
MsgBox "Please Enter Mobile No.",
Text3.SetFocus

End If
End Sub

You might also like