Use Arrow keys in optionbutton
Greg,
Thanks a lot! that's solve my problem on how to change the value of the
option button.
However, the controls in my userform react differently with what I expected
when I use the arrow keys. I guess I have no problem with the tabstop and
tabindex because it works fine when I use the tab key. Why is it that when
I use the arrow keys it jumps over some of the optionbutton? It also set
focus on the other two controls which are commandbuttons (one is the default
button and the other is the cancel button). I am disgusted with the result
and I could not imagine what more will be the reaction of the intended
users.
Please help!
Jon-jon
"Greg Wilson" wrote in message
...
Assuming you have three option buttons then include the
following code in the UF code module:
Private Sub OptionButton1_Enter()
OptionButton1.Value = True
End Sub
Private Sub OptionButton2_Enter()
OptionButton2.Value = True
End Sub
Private Sub OptionButton3_Enter()
OptionButton3.Value = True
End Sub
Regards,
Greg
-----Original Message-----
Hello Newsgroup,
My useform contains optionbuttons with only one groupname
so when one button
is selected (true) the other will be deselected
(false) . The first button
is default to true. How can I make the option button
respond to arrow keys
so that when the I press Arrowdown button below the
selected button will be
the one selected and when I press ArrowUp the button
above will be selected.
Thanks in advance,
Jon-jon
.
|