View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Selecting OptionButtons

Geoff,

Do you have an accelerator key set on the option button?

Enter a character from the button caption in the "Accelerator"
property in the VBE.
Then use Alt + (that character) to activate the button.

Regards,
Jim Cone
San Francisco, USA


"Geoff" wrote in message ...
Spacebar works fine when focus is on a frame which has an Exit event with
Cancel = True clause. Thank you:):)

But in another part of the form I have 4 pairs of txtboxes, each pair
representing hours and minutes. After a correct entry, I move the focus by
SetFocus from one txtbox to the next. The first 3 pairs are summed after
entering minutes in the 3rd pair(box 6) and the total is shown in pair 4.

To assist data entry in the 3rd pair I have an optionbutton which reveals a
'totaliser' for that pair only. Using the mouse I can click for this
function before data is entered into the 3rd pair or just enter directly.

Here is the problem with the Spacebar solution.
Despite using tabstop=true and tab order etc I cannot navigate to this
option button to use the Spacebar, I assume because of the coded tabbing to
the 4th pair of boxes. Does this make sense?

I wondered if i should be using Application.OnKey somehow?

Geoff


"Anne Troy" wrote:

Spacebar, Geoff. :)
*******************
~Anne Troy

www.OfficeArticles.com


"Geoff" wrote in message
...
Hi
Say for example there are 2 form optbuttons in a frame; is it possible to
tab to the required option and 'click' the button using the Enter key? If

so
how?

My form has a number of optionbuttons amongst textboxes and it is becoming
tedious to keep reaching for the mouse to make a choice or confirm

something.
It would be great to just use the keyboard as far as possible.

T.I.A

Geoff