Hi Venkat,..

Could you help me to change few things in the above regex?

liek I have changed it as below

 With CreateObject("vbscript.regexp")
        .Global = True
        .Pattern = "[A-Za-z]+\_[0-9]+"
    If .test(TextBox2.Value) Then
so now I am able to use both caps and small letters in the first field..

Example: Test_100 and TEST_100, test_100 holds good..

I want to have another logic which should allow users to enter test100 or TEST100 or Test100.. What I mean to say that, it should allow only _ in the text box but that should not mandatory... and no other special characters are allowed which is now working fine.. Pls Help..

Thanks.