Having Textbox1 input always in UCase Question 
Author Message
 Having Textbox1 input always in UCase Question

Hi

I was wondering if anyone could help me out
I wanted to have a textbox on my form and at
run time when the user types into this textbox
the text will automatically be in UpperCase
and the user doesn't need to use the Caps or the
Shift key for Uppercase letters.
Is there a code for this??

Thanks in advance
J.J.



Thu, 12 Apr 2001 02:00:00 GMT  
 Having Textbox1 input always in UCase Question

Quote:

>I wanted to have a textbox on my form and at
>run time when the user types into this textbox
>the text will automatically be in UpperCase
>and the user doesn't need to use the Caps or the
>Shift key for Uppercase letters.

In the KeyPress event of the text box do the following....

Private Sub Text1_KeyPress(KeyAscii As Integer)
   KeyAscii = Asc(UCase$(Chr$(KeyAscii)))
End Sub

Frank Carr



Thu, 12 Apr 2001 02:00:00 GMT  
 Having Textbox1 input always in UCase Question

Quote:

> Hi

> I was wondering if anyone could help me out
> I wanted to have a textbox on my form and at
> run time when the user types into this textbox
> the text will automatically be in UpperCase
> and the user doesn't need to use the Caps or the
> Shift key for Uppercase letters.
> Is there a code for this??

Hi,

Put this code in the _change-event:

  i=textbox.selstart
  textbox.text=  ucase(textbox.text)
  textbox.selstart=i

HTH

Michaela



Thu, 12 Apr 2001 02:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. tired of always having to ask questions?

2. Having a form always on top

3. Newbiw having problems with Permanent QueryDef: Query input must contain at least one table or query

4. ~~ Help, I'm having file input problems...

5. MSHTML: Having VB click on an INPUT tag of type IMAGE

6. In Netscape Input text boxes always wider.

7. using TextBox1.text ="" instead of TextBox1.value = "" crashes in some Windows installations

8. Odd behavior when inserting TextBox1 into header

9. Questions I am Having Trouble With

10. question about default property/having problems with For Each loop

11. VB4 Question: Having trouble changing .ScrollBars property

12. Pass values to pop-up window....still having question

 

 
Powered by phpBB® Forum Software