TextBox Control

Private Sub Form_Load()

Dim Control As Control

For each control in Me.Controls

If TypeOf Control is textBox Then

Control.text=” ”

End If

Next Control

End Sub

Private Sub TextPassword_KeyPress(KeyAscii as Integer)

If KeyAscii=vbKetBack Then Exit Sub

If (KeyAscii < 48 or KeyAscii > 57 ) and (KeyAscii <> 45) Then KeyAscii =0

End Sub

Private Sub cmdLogin_Click()

If (Me.TextName.Text=”Visual Basic”) ans (Me.TextPassword.text=”password”) then

msgbox “Login”,vbOKOnly+VBInformation,”Visual Basic”


msgbox “Name and Passoword Wrong”,vbOkOnly + vbExclamation,”Confirm”

End If

End Sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s