• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

problem with textbox

ANKUSHRS1

Member
I have written below code to go dircectly to specific textbox. but problem is when go to that specific textbox cursor goes end of textbox and "space" auto updated. i cant figure it out...pls help.

Code:
Private Sub qty19_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = vbKeyTab Then
qty20.SetFocus
End If
End Sub

upload_2016-7-13_13-16-24.png
 
Modify your code like below.

Code:
Private Sub qty19_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = vbKeyTab Then
KeyCode = 0
qty20.SetFocus
End If
End Sub
 
Back
Top