simultaneous input??

lg_ghostrider
lg_ghostrider used Ask the Experts™
on
is it possible to transfer data from one text box to another before thecommand is executed,[ie input is replicated as it is typed or once textbox is deselected]... id be most grateful.
cheers.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Private Sub Text1_KeyPress(KeyAscii As Integer)
    Text2.Text = Text2.Text & Chr(KeyAscii)
End Sub

Author

Commented:
cheers ... i tryed this and it works, is it possible to code as to also allow delete?? as when i backspace i get a blob after the default and then the new value...?  
Commented:
Private Sub Text1_Change()
    Text2.Text = Text1.Text
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 8 Then
        If Len(Text2.Text) - 1 > 0 Then
            Text2.Text = Mid(Text2.Text, 1, Len(Text2.Text) - 1)
        End If
    End If
End Sub


in this example you no longer need the keypress event
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Commented:
actually now that I think about it all you really need is the textchange code....

Author

Commented:
yes... thats exactly what i needed many thanks, kudos and points to you ,
cheers

Author

Commented:
thanks once again... you helped me out of a bind...

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial