check boxes
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Check Boxes

Check Boxes

resolvedResolved · Medium Priority · Version 2003

replyReply Mon 8 Jun 2009, 18:02Delegate Daren said...

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.

For upcoming training course dates see: Pricing & availability

replyReply Wed 10 Jun 2009, 11:09Trainer Stephen said...

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

replyReply Thu 11 Jun 2009, 15:12Delegate Daren said...

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

replyReply Fri 26 Jun 2009, 14:32Trainer Stephen said...

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.

 

Please browse our web site to find out more about
excel+courses and other Microsoft training courses.

Excel tip:

Change the Print button so it brings up the Print dialogue box

If you want to bring up the Print dialogue box to check your print settings when you hit the Print button, do the following:

1. Right-click on the toolbar that displays the Print button.

2. Select Customise.

3. Click on the Print button on the toolbar to select it, then hold the left mouse button down and drag the button towards the screen below. The button should come off the toolbar.

4. In the Customise dialogue box on your screen, select the Commands tab.

5. Select File from the Categories list, and then locate the Print... icon (looks like the normal Print button, but the word Print has three dots following it).

6. Click on the Print... icon to select it, then use your left mouse to drag and drop the icon onto the toolbar at the top of the screen.

7. Close the Customise dialogue box.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard