CodeItBetter Programming Another VB Programming Blog

How to filter invalid charaters for file name in Text box

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
11
12
'Controls - How to filter invalid charaters for file name in Text box
Private Function FilterFileName(ByRef strKeyAscii As Integer)
    Select Case strKeyAscii
    Case 92, 42, 47, 58, 63, 34, 60, 62, 124
        strKeyAscii = 0
    End Select
End Function
 
'How can I call this function:
'Private Sub txtSL_KeyPress(KeyAscii As Integer)
'    Call FilterFileName(KeyAscii)
'End Sub
Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.