Actually this section for VB 4/5/6, and your code is for VB.Net Section.
For your question.
I suggest to trap any character except "abcdefg" and "12345" when user type it on textbox. So user only can input "abcdefg" or "12345".
Jx_Man
Senior Poster
3,538 posts since Nov 2007
Reputation Points: 1,488
Solved Threads: 524
Skill Endorsements: 64