To run more than one line of code,you must use multiple line(or block)syntax.
This syntax includes the ENDIF statements;
Refer : VB-10 : Set Focus(If-Then)
=========================================================================
Back to Home & VB
This syntax includes the ENDIF statements;
A) Property :
Text Box (Same as VB-10) |
B) Attaching Code to the Object :
Private Sub Text1_LostFocus() If Text1.Text = " " Then MsgBox "Sorry!name cannot be left blank" chance = chance + 1 Text1.SetFocus End Sub |
Refer : VB-10 : Set Focus(If-Then)
Back to Home & VB
No comments:
Post a Comment