+ Reply to Thread
Results 1 to 3 of 3

Check box

  1. #1
    Oppy
    Guest

    Check box

    I have a check box that is linked to a specific cell. How can I get the cell
    that it is linked to change to a certain color when I check the box.

    Thanks

  2. #2
    Norman Jones
    Guest

    Re: Check box

    Hi Oppy,

    Assuming that the checkbox is from the Control ToolBox, try:

    '===============>>
    Private Sub CheckBox1_Click()
    With CheckBox1
    If .Value = True Then
    Range(.LinkedCell).Interior.ColorIndex = 3
    Else
    Range(.LinkedCell).Interior.ColorIndex = xlNone
    End If
    End With

    End Sub

    '<<===============

    This is worksheet event code and should be pasted into the worksheets's code
    module (not a standard module and not the workbook's ThisWorkbook module):

    *******************************************
    Right-click the worksheet's tab

    Select 'View Code' from the menu and paste the code.

    Alt-F11 to return to Excel.

    Change CheckBox1 to the name of your checkbox.

    ---
    Regards,
    Norman



    "Oppy" <[email protected]> wrote in message
    news:[email protected]...
    >I have a check box that is linked to a specific cell. How can I get the
    >cell
    > that it is linked to change to a certain color when I check the box.
    >
    > Thanks




  3. #3
    Dave Peterson
    Guest

    Re: Check box

    Or maybe just use format|conditional formatting?

    Oppy wrote:
    >
    > I have a check box that is linked to a specific cell. How can I get the cell
    > that it is linked to change to a certain color when I check the box.
    >
    > Thanks


    --

    Dave Peterson

+ 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