Hi,
I try to take few checkbox, I can toggle each box but only one checkbox is allowed liked the option button.
I like to keep the linked cells to TRUE or FALSE.
I am not sure I have posted this before.
Thanks
Hi,
I try to take few checkbox, I can toggle each box but only one checkbox is allowed liked the option button.
I like to keep the linked cells to TRUE or FALSE.
I am not sure I have posted this before.
Thanks
Last edited by Rocky2013; 04-13-2015 at 10:38 PM.
You can put this into a Standard Module and assign each checkbox to this macro
Please Login or Register to view this content.
Thanks,
Mike
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
Select Thread Tools-> Mark thread as Solved.
Hello,
Mike it works except I forgot to mention, there are other check boxes for whose does not need to be
allow one check mark but multiple check marks (stand form buttons). Also there may be another
group of check boxes will do the same only allow one check mark in my form.
My guest if this is possible to group them or specifified checkbox names that only allow one check mark.
In the attachment, I add a group 2 of check boxes which allow multiple check marks. When I click any checkbox
in group 1, check marks in group 2 get "uncheck"; which suppose not to affect.
Thanks
Last edited by Rocky2013; 04-11-2015 at 08:15 AM.
Please Login or Register to view this content.
Please click the * below if this helps
Hi JasperD,
the code is not working. For example: If any checkbox in box5 to box7 is not checked (false),
When I click any check box 1 to 4 (even box has a check mark (true)) will add check marks to
all check marks to box 5, 6, 7.
Basicly I can check and uncheck box 5, 6, and 7, box 1-4 do not get changes.
But not the other way.
Please advise.
Last edited by Rocky2013; 04-11-2015 at 02:51 PM.
You're right, sorry.
Please Login or Register to view this content.
Hello,
it works except one little problem I found hopefully it is not an issue.
One one of checkbox 1 to 4 is checked. I cannot uncheck the same one
turn in a FALSE. Because the form is start with all checkboxes are unchecked.
If I precheck the box it could cause problem.
I like to see the same box in group 1 can be checked and unchecked liked the regular
checkbox.
Thanks
Please Login or Register to view this content.
Hi,
Finally I got what I want, it is working perfectly.
Thanks for your time and effort.
Also thanks to Mike.
Best Regards,
Another way
Please Login or Register to view this content.
Last edited by mike7952; 04-13-2015 at 02:07 PM.
Mike,
Thanks. This is also a nice way to group the box1 to box 4 use as option button.
Most checkboxes in my form are the normal form buttons except 1 or 2 places
using option buttons (a checkbox style instead of round).
But how to uncheck the checkbox that has a check mark in Group 1? Basicly I like to click again
to uncheck.
Thanks for another tip.
Regards,
Last edited by Rocky2013; 04-13-2015 at 09:05 AM.
Hello JasperD,
I notice that if there is a text box (which is also a shape", when I click any box1 to 4. A pop-up "Run-time error '438': Object doesn't this property
or method" will show. If I delete the text box then there will be pop-up.
My real form has pop-up text box or pop-up comments.
Hello Mike,
I have same issue with your code on pop-up 438 error.
Please advise.
Last edited by Rocky2013; 04-13-2015 at 01:28 PM.
I have updated the code to uncheck check box if check box is already check in post #10
Hi Rocky,
originally I just adjusted Mike's code, so it's logical they give the same error.
The 'problem' lies in that other shapes don't necessarily have the possibility to be 'true' or 'false'
The line in bold is added and basically checks for the word 'check' in the name (check box).Please Login or Register to view this content.
This should fix your problem.
Hello JasperD,
Now it works I can check and uncheck checkbox in group 1, also no error pop-up error anymore.
Hello Mike,
JasperD use your orginal code and solve the problem.
"Mike, sorry for keep coming back. Can you please take a look at the attached that the code is from your 13.
The attached codes suppose to do uncheck the boxes in group 1. The reason I want to revisit your code, when I try to add
to the form, all my ~30 checkboxes are standard form control except 1 group is acted like a option checkbox.
I am looking for your help. "
Special thanks to both of you, and the team work that provding the help and solution.
Best Regards!
Last edited by Rocky2013; 04-13-2015 at 09:12 PM.
Hell Mike,
After few try and error, it seems it work now.
This is what I did
1. Delete "Exit for"
2. Move up ".ControlFormat.Value = xlOn" above End If"
PHP Code:
Sub cbChecked()
ReDim ckboxGroup1(1 To 4)
ckboxGroup1 = [{"Check Box 1","Check Box 2","Check Box 3","Check Box 4"}]
For i = 1 To 4
With ActiveSheet.Shapes(ckboxGroup1(i))
If Application.Caller = .Name Then
if .ControlFormat.Value = xlOn then
.ControlFormat.Value = xloff
.ControlFormat.Value = xlOn
End if
Else
.ControlFormat.Value = xlOff
End If
End With
Next
End Sub
Last edited by Rocky2013; 04-13-2015 at 10:34 PM.
This should do it
Please Login or Register to view this content.
Mike,
Your final code did it!
When I played around your code, even the vba syntax in post 16 does not look right but it works.
I will use yours.
Thanks
Last edited by Rocky2013; 04-14-2015 at 06:23 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks