Select checkbox with tab key?

B

BrianG

I've added a checkbox to a form and assigned a macro that totally
changes the behaviour of the form if the checkbox is ticked. I've
locked all cells on the form as necessary so that the user simply uses
the tab key to move to the next cell requiring data entry. The problem
is that the checkbox must be mouseclicked to tick it. I'd like to be
able to select it with the tab key and use the spacebar to tick it. Is
this possible?

BrianG


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
V

Vasant Nanavati

Whan you say "form", I assume you mean a worksheet that acts as a form and
not a UserForm. If so, there is no straightforward way to select a control
on a worksheet by tabbing.

For example, when you have a range selected on the worksheet and then you
press the Tab key, how would Excel know whether you want the normal Tab key
behavior, or selection of the control?
 
B

Bob Phillips

Vasant,

It can be done if the object is selected, and then use a key event for that
object to trap the tab key, and tab to another pre-defined object. Kludgy,
but it works on control toolbox objects (never tried to make it work for
forms objects as you can't get at the events).

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
V

Vasant Nanavati

Hi Bob:

Yes, I've seen that workaround. But the way I read it, the OP had a checkbox
that he wanted to tab to from the worksheet (he said he was tabbing from
cell to cell for data entry).

Perhaps I was over-interpreting the post ... it wouldn't be the first time!
<g>

Regards,

Vasant.
 
B

Bob Phillips

Hi Vasant,

I wasn't really suggesting this for the OP (it gets very cumbersome), but
just making sure that you knew for your reference. Like to keep up the
contact with regulars<vbg>

Bob
 
B

BrianG

Thanks for the responses. Glad I was able to spark a little tet-a-tet
amongst the regulars<g>.

--
BrianG



*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
V

Vasant Nanavati

Like to keep up the
contact with regulars

Yep, that's what I enjoy most about this group (next to spending an hour to
come up with a creative solution for someone and never getting any
feedback!).
 
B

Bob Phillips

Vasant Nanavati said:
Yep, that's what I enjoy most about this group (next to spending an hour to
come up with a creative solution for someone and never getting any
feedback!).

or worse ... finding that the hour spent on the creative solution was either
wasted because you misunderstood the question, or Tom Ogilvy comes up with a
neat one-liner that blows your 500 lines of code out of the water<vbg>.
 
V

Vasant Nanavati

Yes, there's that too. No shortage of thrills around here ... we must be
masochists!

Regards,

Vasant
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top