+ Reply to Thread
Results 1 to 5 of 5

when select cell in range checkbox value is true_but how?

  1. #1
    Registered User
    Join Date
    04-13-2006
    Posts
    4

    when select cell in range checkbox value is true_but how?

    Hi all,

    I have 3 checkbox in sheet and i have 3 range name x, y and z.

    what i want is,

    when i select any cell in x range checkbox1.value=true is run,
    when i select any cell in y range checkbox2.value=true is run,
    when i select any cell in z range checkbox3.value=true is run.

    what is the code for this operations?

    thanks.....

  2. #2
    Ardus Petus
    Guest

    Re: when select cell in range checkbox value is true_but how?

    With your 3 ranges named "sel_X", "sel_Y" and "sel_Z",
    paste following code in worksheet's code:

    '-----------
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    CheckBox1.Value = _
    Not Intersect(Range("sel_X"), Target) Is Nothing
    CheckBox2.Value = _
    Not Intersect(Range("sel_Y"), Target) Is Nothing
    CheckBox3.Value = _
    Not Intersect(Range("sel_Z"), Target) Is Nothing
    End Sub
    '------------------

    HTH
    --
    AP

    "up2you" <[email protected]> a écrit dans
    le message de news:[email protected]...
    >
    > Hi all,
    >
    > I have 3 checkbox in sheet and i have 3 range name x, y and z.
    >
    > what i want is,
    >
    > when i *select any cell in x range checkbox1.value=true *is run,
    > when i *select any cell in y range checkbox2.value=true *is run,
    > when i *select any cell in z range checkbox3.value=true * is run.
    >
    > what is the code for this operations?
    >
    > thanks.....
    >
    >
    > --
    > up2you
    > ------------------------------------------------------------------------
    > up2you's Profile:

    http://www.excelforum.com/member.php...o&userid=33468
    > View this thread: http://www.excelforum.com/showthread...hreadid=532691
    >




  3. #3
    Registered User
    Join Date
    04-13-2006
    Posts
    9
    To snag a snippet of code from here:
    http://www.cpearson.com/excel/named.htm

    You can do this:
    Please Login or Register  to view this content.
    Change it to set the value of your checkboxes instead of the cell(1,1)'s value.

  4. #4
    Registered User
    Join Date
    04-13-2006
    Posts
    9
    To snag a snippet of code from here:
    http://www.cpearson.com/excel/named.htm

    You can do this:
    Please Login or Register  to view this content.
    Change it to set the value of your checkboxes instead of the cell(1,1)'s value.

  5. #5
    Registered User
    Join Date
    04-13-2006
    Posts
    4
    hi again all,
    that's great. you are perfect consultants.

    See all again...

+ 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