Link to home
Start Free TrialLog in
Avatar of Tosagua
Tosagua

asked on

Control TAB (Tabbing) Direction

We have a simple Excel form (not UserForm), that allows listing information for 4 seperate truckloads.

When you hit TAB the next horizontal (unprotected) cell is selected. However, we want to TAB Down first, and then move to the next column of unprrotected cells.

See attached example.

If it isn't possible, what other alternatives should we explore ?

Tosagua
CPSR-DISPATCH-SHEET.xls
Avatar of ragnarok89
ragnarok89

Not possible, AFAIK. However, you could use a macro for this. Just start recording your macro, execute the desired actions (tabbing, arrows keys, etc), and then stop recording.

Excel will create a module with the VBA code all done for you that represents your recorded actions. You can then tweak this code to get exactly what you want.
Avatar of Saqib Husain
You can press Enter instead of Tab
ASKER CERTIFIED SOLUTION
Avatar of zorvek (Kevin Jones)
zorvek (Kevin Jones)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

Hi,

If your Enter key is set to move right (as most are) then that isn't an aoption.  If itis set to move down you could use it in this macro but I would use the downa arrow as follows:

//In the ThisWorkbook Module:

Option Explicit

Private Sub Workbook_OpenZ()
    Application.OnKey "{TAB}", "mdown"
End Sub
       
Private Sub Workbook_BeforeCloseZ(Cancel As Boolean)
    Application.OnKey "{TAB}"
End Sub

Private Sub Workbook_Activate()
    Application.OnKey "{TAB}", "mdown"
End Sub

Private Sub Workbook_Deactivate()
    Application.OnKey "{TAB}"
End Sub

and in a standard module:

Sub mdown()
        Application.SendKeys "{DOWN}"
End Sub

Cheers,

dr
Avatar of Tosagua

ASKER

I am still working on this, but i am going to be gone for a while, and i don't want the question abandoned.

Obviously Microsoft needs to add another feature. But I think this going to work.

Thank you for the extensive effort that you put into this answer.

Tosagua