+ Reply to Thread
Results 1 to 2 of 2

How to select checkBoxes as a group in

  1. #1
    Registered User
    Join Date
    06-01-2005
    Posts
    19

    Lightbulb How to select checkBoxes as a group in

    hi, does anyone know how to select checkBoxes as a group by programming in Excel VBA?

    I need to programm a 'checkAll' checkBox to set all checkBox value to be true. how can I control them as a group?

    Thanks a lot.
    Fendic

  2. #2
    Jason Morin
    Guest

    RE: How to select checkBoxes as a group in

    With your "checkall" checkbox being "checkbox1", try this in a standard module:

    Private Sub CheckBox1_Click()
    Dim OLEobj As OLEObject
    For Each OLEobj In ActiveSheet.OLEObjects
    If TypeOf OLEobj.Object Is MSForms.CheckBox Then
    If OLEobj.Name <> "CheckBox1" Then
    OLEobj.Object.Value = ActiveSheet.OLEObjects("CheckBox1"). _
    Object.Value
    End If
    End If
    Next OLEobj
    End Sub
    ---
    To use, press ALT+F11. Go to Insert > Module. Paste in the code. Press ALT+Q.

    HTH
    Jason
    Atlanta, GA




    "Fendic" wrote:

    >
    > hi, does anyone know how to select checkBoxes as a group by programming
    > in Excel VBA?
    >
    > I need to programm a 'checkAll' checkBox to set all checkBox value to
    > be true. how can I control them as a group?
    >
    > Thanks a lot.
    > Fendic
    >
    >
    > --
    > Fendic
    > ------------------------------------------------------------------------
    > Fendic's Profile: http://www.excelforum.com/member.php...o&userid=23959
    > View this thread: http://www.excelforum.com/showthread...hreadid=376953
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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