On my form I have a textbox and a grid. The textbox has Tab Index 0 and Grid has Tab Index 1 (these cannot be changed). When I press tab in the textbox it automatically sends focus to the grid, however I want the code to do something when tab is pressed.
Code I have tried:
Code:
Private Sub txtBox_KeyDown(KeyCode As Integer, Shift As Integer)
        
    Select Case KeyCode  
        Case vbKeyTab
            ' Do this
        Case vbKeyReturn
            ' Do this
     End Select
Strange thing is it will go into the code if I press return but not if I press tab