sendkeys ("tab") on txtBox.maxlength 
Author Message
 sendkeys ("tab") on txtBox.maxlength

Hello
I have 4 text boxes with the maxlemgth property set to 4.
What I need to do is call sendkey ("tab") when the maxlength for the text
boxes has been reached.

How can this be done
Thank
Rick



Fri, 02 Dec 2005 18:45:44 GMT  
 sendkeys ("tab") on txtBox.maxlength

on Mon, 16 Jun 2003 06:45:44 -0400 bearing the following
fruit:

Quote:
>Hello
>I have 4 text boxes with the maxlemgth property set to 4.
>What I need to do is call sendkey ("tab") when the maxlength for the text
>boxes has been reached.

>How can this be done
>Thank
>Rick

Yes.

J

--
If you have a lot of tension and you get a headache,
do what it says on the aspirin bottle:
Take two and keep away from children.  (Barbie Jo)

[Abolish the TV Licence - http://www.tvlicensing.biz/]



Fri, 02 Dec 2005 20:14:54 GMT  
 sendkeys ("tab") on txtBox.maxlength
Hi Rick,

Adding these two procedures works unless you are trying to paste into an
already full text box.

Private Sub Text1_Change(Index As Integer)

    If Len(Text1(Index)) = 4 Then
        SendKeys vbTab
    End If

End Sub

Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)

    Select Case KeyAscii
        Case Asc(vbBack)
            ' allow the backspace
        Case Else
            If Len(Text1(Index)) = 4 Then
                SendKeys vbTab
            End If
    End Select

End Sub

That should get you started anyway.

regards,

Simon


Quote:
> Hello
> I have 4 text boxes with the maxlemgth property set to 4.
> What I need to do is call sendkey ("tab") when the maxlength for the text
> boxes has been reached.

> How can this be done
> Thank
> Rick



Fri, 02 Dec 2005 20:24:18 GMT  
 sendkeys ("tab") on txtBox.maxlength
Many thanks Simon
That fixed me right up.

Quote:
> Hi Rick,

> Adding these two procedures works unless you are trying to paste into an
> already full text box.

> Private Sub Text1_Change(Index As Integer)

>     If Len(Text1(Index)) = 4 Then
>         SendKeys vbTab
>     End If

> End Sub

> Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)

>     Select Case KeyAscii
>         Case Asc(vbBack)
>             ' allow the backspace
>         Case Else
>             If Len(Text1(Index)) = 4 Then
>                 SendKeys vbTab
>             End If
>     End Select

> End Sub

> That should get you started anyway.

> regards,

> Simon



> > Hello
> > I have 4 text boxes with the maxlemgth property set to 4.
> > What I need to do is call sendkey ("tab") when the maxlength for the
text
> > boxes has been reached.

> > How can this be done
> > Thank
> > Rick



Sat, 03 Dec 2005 05:41:18 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. sendKeys("{Tab}") to another form

2. SendKeys "{tab}" doesn't work

3. SendKeys "{TAB ??}"

4. SendKeys("{TAB}") catches depressed Shift-Key

5. sendkeys "^{TAB}", she no work!

6. sendkeys "+{TAB}"

7. SendKeys "{TAB}"

8. SendKeys "{TAB}"

9. SendKeys "%({TAB})"

10. Why Does Sendkeys "TAB" NOT work

11. How to establish "Maxlength" in DATAGRID

12. Need help using the "Sendkeys" command

 

 
Powered by phpBB® Forum Software