Substitute Tab key...

Dear experts...
What i'm trying to do is rather easy, but for some reason i'm not very succesfull achiving it...

What i'm attempting to do is make the Ctrl-(LeftArrow) combination pass the  focus between the controls on the window just like the "Tab" key does...

I would really appreciate your help.
Thank you...

LVL 1
asaflahv1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

manojaminCommented:
'do this
' set Form1.KeyPreview = True in property window

Private wasControl As Boolean
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If (KeyCode = vbKeyControl And Not wasControl) Then
        wasControl = True
    End If
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    If (KeyCode = vbKeyLeft And wasControl) Then
        wasControl = False
        Debug.Print "this is whare you detect that this is ""Ctrl+<-"""
    End If
End Sub
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
manojaminCommented:
'oh! change this as shown...

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    If (KeyCode = vbKeyLeft And wasControl) Then
        Debug.Print "this is where you detect that this is ""Ctrl+<-"""
    End If
    wasControl = False
End Sub
0
KDivadCommented:
In form_Keyup:

If KeyCode = vbKeyLeft And Shift = vbKeyControl Then
    KeyCode = 0
    Shift = 0
    SendKeys "{Tab}"
End If
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.