Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clicking on checkbox changes color of another cell 1

Status
Not open for further replies.

nelson97

IS-IT--Management
Joined
Aug 10, 2004
Messages
105
Location
US
Hi,

Working on Excel...I created a color coded sheet where I have Cells with embedded checkboxes and when you click on the checkbox that cell turns a certain color. I would like to add to that functionality whereby if I click on the checkbox it will also change the color of another cell.
For example I have cell D4 set to change Green if you click on the checkbox. I want cell D3 to change cell color to xlnone when D4 is clicked.

Suggestions?

Thank you
 
Hi,

What technique is being used CURRENTLY to change the InteriorColor? Code or Conditional Formatting??? Please be specific with details.

Skip,

[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue]
 
HI, It's to change the Interior color of the cell D3 to "no color" / xlnone. Cell D3 would already be colored, e.g. RED. So when I click on checkbox on Cell D4, D3 interior color would turn white.
 
It sure would have been nice to see your code.
Code:
Private Sub CheckBox1_Click()
    With CheckBox1
        With Cells(.TopLeftCell.Row, "D").Interior
            If CheckBox1.Value Then
                Range("D:D").Interior.ColorIndex = xlNone
                .ColorIndex = 3
            Else
                .ColorIndex = xlNone
            End If
        End With
    End With
End Sub


Skip,

[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top