MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Setting a "tab order" for my worksheet...

Posted by Chris Rock on August 10, 2001 7:07 AM

I have a data input sheet with several UN-used cells.
What I'd like to see happen is when the user enters data in the appropriate cell and hits Enter (or tab), the cursor goes to the NEXT appropriate cell (which is NOT adjacent to the cell they just entered the data in), so they don't accidentally enter data in the wrong cell.

Can this kind of "tab order" be set up in Excel?

Posted by sean tobin on August 10, 2001 9:18 AM

I think you can just unlock the cells that you need to have data entered and then protect the sheet. when you tab, it only goes to those cells that are not locked. I'm not sure of a way to specify a tabbing order, though.

Posted by Damon Ostrander on August 12, 2001 9:31 PM


Cells do not strictly speaking have a tab order, but you can accomplish the same thing using the Worksheet_Change event. For each cell that you want to assign a "tab order", just test in the Worksheet_Change event (using the Target argument) whether the cell that has changed is one of your input cells. If it is, then depending on which cell has changed either select or activate (Select or Activate method) the next cell in your desired "tab order" sequence.