Check Box problem

taylors

New Member
Joined
Apr 17, 2006
Messages
24
Hi all

Can someone please let me know if there is a quick and simple way of unchecking upto 14 check boxes

Thanks
Stuart
 

Some videos you may like

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
Hi,

you won't need the entire code
it depends how you created the boxes
this can be used on a sheet
Code:
Sub uncheck_all()
Dim sh As Shape
Application.ScreenUpdating = False
    For Each sh In ActiveSheet.Shapes
      If sh.Type = msoOLEControlObject Then
        If TypeName(sh.OLEFormat.Object.Object) = "CheckBox" Then sh.OLEFormat.Object.Object = False
      End If
      If sh.Type = msoFormControl Then
        If sh.FormControlType = xlCheckBox Then sh.OLEFormat.Object = False
      End If
    Next sh
Application.ScreenUpdating = True
End Sub
kind regards,
Erik
 

Watch MrExcel Video

Forum statistics

Threads
1,114,384
Messages
5,547,638
Members
410,805
Latest member
Ginoji
Top