views:

91

answers:

1

I'm looking through some VSTO excel code and there seems to be a major wheel reinvention swtich statement in an event handler which is attached to every control (text boxes, combos etc), calling Focus() depending on the Tag property (being used in place of a tabIndex property)

Is tab order alien to VSTO?

A: 

The controls are sitting on an Excel worksheet, and are placed relative to cells.

Cells are the main point of interaction with Excel, rather than the controls.

However, if you only want users to use the controls, you can lock the cells using Protection, and only allow them access to the Controls.

Effectively, you are stopping them tabbing on the cells, so would only have access to your controls.

Note: I'm not recommending you do this, but, if it meets your requirements......

Nick Haslam
I agree, I'd have used cells if I could, but I inherited this code, and it uses listboxes, checkboxes and radiobuttons. Have been asked not to change the interface, just get it working..
Nick