Mask Edit Control
Visual Basic
3
Posts
2
Posters
0
Views
1
Watching
-
hi, i am using a mask edit control AAA-AAAA Using A for alphanumeric...How can i make some characters optional and some required??? THANKS
-
hi, i am using a mask edit control AAA-AAAA Using A for alphanumeric...How can i make some characters optional and some required??? THANKS
There are several ways to do this, here is one. Private Sub Text1_Change() 'Check position of character If len(Text1) = 3 then If right(Text1,1) = "A" Or IsNumeric(Text1) = True Then MsgBox "There's an A or an numeric in Text1 ", 64, "Error Message" Exit Sub End If End If End Sub Nick Parker