'************************************** ' Name: Only Upper or Lower ' Description:Using 1 Line of Code Allow ' Only Upper Case Letters to be Typed in a ' Text Box. Using 1 Line of Code Allow Only Lower Case Letters to be Typed in a Text Box. ' By: PAIK ' ' ' Inputs:None ' ' Returns:None ' 'Assumes:None ' 'Side Effects:None '************************************** ' Put a 2 TextBoxes on your Form then Pa ' ste the code below: '/////////////////////////////////////// ' /////////////////////// 'To allow Lower Case Letters Only '/////////////////////////////////////// ' ////////////////////// Private Sub Text1_KeyPress(KeyAscii As Integer) KeyAscii = Asc(LCase(Chr(KeyAscii))) End Sub '--------------------------------------- ' ------------------ '/////////////////////////////////////// ' /////////////////////// 'To allow Upper Case Letters Only '/////////////////////////////////////// ' ////////////////////// Private Sub Text2_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii))) End Sub '--------------------------------------- ' --------------------------