Ahhh, I see what you're saying now.
I didn't test but here's what I think is happening. But first some ground-rules. When we tab through OptionButton-Groups, only the one that's selected gets the focus. The others in the group don't get the focus, even on subsequent tab keys. I think we can all agree on that.
However, if you start disabling things and give the focus nowhere else to go but an unselected OptionButton, the focus will go there and
also select that OptionButton. Here's an example. I just threw two OptionButtons onto Form1:
Attachment 156799
And then I put this code into Form1:
Code:
Option Explicit
Private Sub Form_Click()
Option1.Enabled = False
End Sub
Now, when you execute that program, it'll auto-select Option1 because that's the lowest TabOrder, and the focus just automatically goes there.
However, now here's the trick. When you click on the form, Option1 gets disabled, and there's only one other place for the focus to go: Option2.
Therefore, the focus goes to Option2 and it gets auto-selected, even though Option1 was previously auto-selected.
I do believe that's the phenomenon you're seeing. You're isolating the focus, not giving it anyplace to go.
Best Regards,
Elroy
EDIT1: Actually, I
did test, and it works exactly as I outlined.
EDIT2: Solutions: 1) Don't have any of your OptionButtons as the lowest enabled TabOrder; and 2) Keep the TabOrders together on your OptionButton-groups; and 3) Don't start disabling OptionButtions while one-in-a-group has the focus. If you abide by those three rules, I don't think you'll have any problems. I think, in most cases, we sort of naturally abide by them, but it's obviously possible to violate them.