I have a check box in C1. How do you check to see if it checked and if so, highlight A1 & B1? Thanks
I have a check box in C1. How do you check to see if it checked and if so, highlight A1 & B1? Thanks
Peace of mind is found in some of the strangest places.
Hi Austen,
Depends on which kind of checkbox you're using. If it's ActiveX and (you created it from the Toolbox menu), then use this:
If it came from the forms menu, though, you'll have to do something different.Private Sub CheckBox1_Click() If Me.CheckBox1.Value = True Then Me.Range("A1:B1").Interior.ColorIndex = 35 Else Me.Range("A1:B1").Interior.ColorIndex = 0 End If End Sub
Ken Puls, CMA - Microsoft MVP (Excel)
I hate it when my computer does what I tell it to, and not what I want it to.
Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar
This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!
Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!
Came from the forms menu. Oh and BTW I want to do it "on Click"
Peace of mind is found in some of the strangest places.
Link it to a cell, and then test that cell value.Originally Posted by austenr
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
example please
Peace of mind is found in some of the strangest places.
Originally Posted by austenr=IF(A20,"Checked","Unchhecked")
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber