troubleshooting Question

Using the Tab key in Grid Controls

Avatar of Ursi
Ursi asked on
Visual Basic Classic
8 Comments1 Solution204 ViewsLast Modified:
I have a textbox overlayed on Grid1.Row = 1 and
Grid1.Col = 0. I use the Enter key (KeyPress event, KeyAscii = 13) to write the contents of the textbox into cell Row = 1, Col = 0, and then move the textbox to the next column, cell Row = 1, Col = 1. The code starts like this:
Private Sub Text1_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then.....
This works fine, but if I want to do the same with the Tab key(KeyAscii = 9), it doesn't work. Why?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros