Mourning the loss of our friend, WhitPhil.
Welcome to Tech Support Guy!
Read our
Welcome Guide
or take a minute to watch the video below!
Join
Tour
Login
Join for free!
Forgot your username or password?
Username
Password
Save?
Search
Home
Forums
Library
News
Store
Donate
Security & HJT
Software & Hardware
Operating Systems
Internet & Networking
General Tech
Community
Software Development
Tag Cloud
access
audio
black screen
blue screen
boot
bsod
connection
crash
dell
desktop
driver
drivers
dvd
email
error
excel
firefox
hard drive
hardware
hijackthis
internet
keyboard
laptop
malware
monitor
motherboard
network
networking
outlook
problem
processor
recovery
registry cleaner
router
safe mode
slow
sound
spyware
tdlwsp.dll
trojan
vba
video
virus
vista
vundo
windows
windows 7
windows vista
windows xp
wireless
Search
Search for:
Software Development
All Forums
Tech Support Guy Forums
>
Software & Hardware
>
Software Development
>
Excel checkboxes
Tip:
Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]
Computer problem?
Tech Support Guy is completely free -- paid for by advertisers and donations.
Click here to join today!
If you're new to Tech Support Guy, we highly recommend that you visit our
Guide for New Members
. Enjoy!
Thread Tools
VanHelsing
Junior Member with 5 posts.
Join Date: Nov 2009
Experience: Intermediate
03-Nov-2009, 09:40 AM
#1
Excel checkboxes
Hi,
I'd lie a little help please regarding Excel 2007 checkboxes. I have 3 of them but I only need one to be checked at a time. Can it be done with VBA automatically?
Thank you in advance.
Register for free to hide this ad!
OBP
Distinguished Member with 9,342 posts.
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
03-Nov-2009, 10:39 AM
#2
VanHelsing, welcome to the Forum.
You usually get a quicker and better response to Excel/Access/Word questions if you post on the Business Applications Forum.
But to get back to your question, each Checkbox will need VBA like this one for Checkbox1, I am sure that you can work out the other two.
Private Sub CheckBox1_Click()
If CheckBox1 = -1 Then
CheckBox2 = 0
CheckBox3 = 0
End If
End Sub
__________________
OBP
I do not give up easily
wedonttakecrap
Junior Member with 7 posts.
Join Date: Nov 2009
Experience: Advanced
03-Nov-2009, 01:28 PM
#3
Hello VanHelsing,
I was wondering why, in this instance, you were using checkboxes instead of a Option (radio) button group? Option buttons only allow one choice to be selected, and saves tedious programming.
A friendly bit of advice to any who may read this: For simple applications of checkboxes and radio buttons, be sure to use the Form Controls from "Developer > Controls > Insert" on the ribbon. It not only saves programming time, but they are not blocked by macro security settings.
happy hacking.
VanHelsing
Junior Member with 5 posts.
Join Date: Nov 2009
Experience: Intermediate
04-Nov-2009, 01:24 AM
#4
Thank you both very much, I got my question answered
But I have another one: Using radio buttons is excellent but I have 3 different sections, each containing 3 radio buttons and I need those 3 sections to be selected independently.
wedonttakecrap
Junior Member with 7 posts.
Join Date: Nov 2009
Experience: Advanced
04-Nov-2009, 08:39 PM
#5
First, place a group control. Then place your radio buttons inside the borders of the group control. It's ridiculously easy in 2007, but not terribly intuitive.
The radio buttons will only interact with the other ones in the control borders
Cheers.
Tags
checkbox
,
excel
Smart Search
Find your solution!
«
Previous Thread
|
Software Development
|
Next Thread
»
Currently Active Users Viewing This Thread: 1
(0 members and 1 guests)
WELCOME TO TECH SUPPORT GUY!
Are you looking for the solution to your computer problem?
Join our site today
to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our
Welcome Guide
to get started.
Thread Tools
Show Printable Version
Email this Page
Twitter!
|
Podcast
|
Mobile
|
Advertise
-- Khaki
-- Classic Blue
-- Gray Night
Contact Us
-
HelpOnThe.Net
-
Archive
-
Terms of Service
-
Top
You Are Using:
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 03:37 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.