PDA

View Full Version : Word and ActiveX checkboxes...



L3vi25
08-14-2008, 01:09 PM
Good afternoon :hi:

I am currently a new user on VBA so heres a snippit of whats going on.

Preferred outcome:
To have either checkbox when selected or activated to prompt the other checkbox to unselect de-activate.

Situation:
Currently I am working on a Word2007 online application form, while it has many applications/controls I only need two of these checkboxes to communicate back and forth. It was my understanding (which is purely noobish) that if I grouped these two checkboxes together under say Groupname: "Nameplate" that it would allow for my desired result/preffered outcome. Alas this is not the case and both of the checkboxes still being grouped together allow me to check both boxes.

All help is appreciated, and I look forward to being humbled! :bow: (I am like a sponge and will absorb everything you say.) Please keep in mind I am new to coding/vba in general so define all terms.

Have a great day!

lucas
08-14-2008, 08:25 PM
Try radio buttons grouped.

L3vi25
08-15-2008, 08:51 AM
Thanks for the info lucas, I will test out the radial buttons instead.

Another question: Is there a more optimal way to group control boxes? The method I am currently using is right clicking the item to prompt properties and grouping under groupname.

lucas
08-15-2008, 09:24 AM
If you are working in vba in word you don't even need to group radio buttons. Only one can be selected.

If you are working on an html, javascript, etc. I cannot be sure the same rules would apply.

L3vi25
08-15-2008, 09:40 AM
By radio buttons are you talking about option/radial buttons? From my test run it seems this is a viable option as the option buttons performed for my optimal result.

Do checkboxes just not have this option or do I need to script something in the background?

CreganTur
08-15-2008, 11:37 AM
You can make checkboxes work like radio buttons (where only one in a series can be selected) but it takes some special VBA code to make it work. Take a look at this thread (http://www.vbaexpress.com/forum/showthread.php?t=20257) that discusses this problem- MOS Master provides a very good solution.