+ Reply to Thread
Results 1 to 7 of 7

Check Boxes

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Check Boxes

    Hello:

    Please refer to attached file.
    I have check boxes in cell I1:I14
    I need a Code which will toggle Check/uncheck all check boxes if check box in cell I17 is clicked.

    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Check Boxes

    Assign this macro to your check box 37

    Sub CheckUncheck()
    Dim ws As Worksheet: Set ws = ActiveSheet
    Dim ctrl As Shape
    Dim lChkBox As Integer
    
    lChkBox = IIf(ws.Shapes("Check Box 37").ControlFormat.Value = 1, 1, -4146)
    
    For Each ctrl In ws.Shapes
        If ctrl.Name <> "Check Box 37" Then
            ctrl.ControlFormat.Value = lChkBox
        End If
    Next ctrl
    
    End Sub
    Attached Files Attached Files

  3. #3
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Check Boxes

    Try this:-
    Sub ListFilesByDate()
    Dim shp As Object
    With Worksheets("sheet1")
      For Each shp In .Shapes
        If shp.Type = msoFormControl Then
              If shp.FormControlType = xlCheckBox Then
                   If Not shp.Name = "Check Box 37" Then
                      shp.OLEFormat.Object.Value = ActiveSheet.Shapes("Check Box 37").OLEFormat.Object.Value
                    End If
             End If
        End If
     Next
    End With
    End Sub

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Check Boxes

    Hi JieJenn:

    I have not done check boxes in the past as much.
    i am having problem assigning/creating check box and name as "Check Box 37"
    Please guide little further.
    Thanks a lot
    Riz

  5. #5
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Check Boxes

    Hi JieJeen:

    Thanks a lot.
    Will test more and let you know if further help is needed.
    Thanks.
    Riz

  6. #6
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Check Boxes

    I thought the CheckBox in Cell I17 is named Check Box 37
    Attached Images Attached Images

  7. #7
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Check Boxes

    Hi MickG:

    Got it, thanks a lot.
    Will test more and let you know if further help is needed.
    Thanks.
    Riz




    Riz

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Check boxes that delete other check boxes and change the color of another cell.
    By nhamhamilton in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-29-2014, 02:40 PM
  2. [SOLVED] Coding Yes/No option buttons to not allow check boxes or require check boxes
    By HeyInKy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-30-2014, 11:32 PM
  3. Replies: 1
    Last Post: 05-23-2013, 10:42 AM
  4. I need a code for presence check to check multiple text boxes and combo boxes
    By Lee_wwfc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2013, 01:53 PM
  5. Automatic setting of check boxes based on other check boxes?
    By ArchiveMike in forum Excel General
    Replies: 5
    Last Post: 07-31-2012, 09:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1