Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

check boxes

ResolvedVersion 2003

Daren has attended:
Excel VBA Intro Intermediate course

Check Boxes

In Excel, Can Check Boxes be made to work in the same way as Option Buttons

i.e. in a row of 3 check boxes, only 1 can be ticked at any one time.

If one of the boxes were ticke it would give a True or false answer

Or is there a way that this can be controled in VB.

RE: Check Boxes

Hi Daren

Thank you for your question

The easiest way would be to write an after update event for each check box, whereby if that check box's value is true, then the values of all the other check boxes are set to false.

On this basis, as soon as you ticked a check box the code would remove any ticks from the other check boxes.

Regards

Stephen

RE: Check Boxes

Hi Stephen

Thank yor for you help, this does sound like what I need to do.

I have tried looking throught the hlelp menus and can find referance to the after update event, but connot workout out how to write

could you tell me how I would wirte this

RE: Check Boxes

Hi Daren

Sorry for the delay in responding

Each combo box would have an after update event associated with it, each time the code would set the other combo boxes equal to false, so;

Sub ComboBox1_(After Update)

ComboBox2.value = False
ComboBox3.value = False
ComboBox4.value = False
ComboBox5.value = False



End sub


Hope this helps

Regards

Stephen

Fri 3 Jul 2009: Automatically marked as resolved.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Get back to active cell

If you have scrolled away from the active celland want to get back t it quicly you can Ctrl and Backspace to get back

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.08 secs.