CodeItBetter Programming Another VB Programming Blog

How to make lowercase when entering the text in a text box

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'Controls - How to make lowercase when entering the text in a text box
Public Function fnMakeLowerCase(txtBox As TextBox)
    'To convert the text to Lower case
    Dim lngSelStart As Long, lngSelLength As Long
With txtBox
    lngSelStart = .SelStart
    lngSelLength = .SelLength
    .Text = LCase$(.Text)
    .SelStart = lngSelStart
    .SelLength = lngSelLength
End With
End Function
'How can I call this function:
'Private Sub Text1_Change()
'Call fnMakeLowerCase(Text1)
'End Sub
Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.