Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I make a check box highlight cells if true?

I'm trying to add a check box so that when checked, it will highlight certain
cells. I've been trying to write a Macros for it and can't figure it out...
any help?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How do I make a check box highlight cells if true?

If using a checkbox from the Control Toolbox Toolbar, then place it on the
sheet and double click on it. This should take you to the click event

Private Sub Checkbox1_Click()

end Sub

put code in here
Private Sub Checkbox1_Click()
if Checkbox1.Value = True then
Range("A5:F20").Interior.ColorIndex = 3
else
Range("A5:F20").Interior.ColorIndex = xlNone
End if
end Sub

return to excel and in the control toolbox toolbar, click the top right
control so it does not appear depressed. This takes you out of design mode
and allow the events to fire when you click the control.

Adjust to suit.

--
Regards,
Tom Ogilvy


"BrianXJ" wrote in message
...
I'm trying to add a check box so that when checked, it will highlight

certain
cells. I've been trying to write a Macros for it and can't figure it

out...
any help?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use the Stop If True Condition for highlight cells Fefe Excel Worksheet Functions 1 March 14th 10 01:51 PM
Can you highlight locked cells in excell, so you can check i Tony Excel Discussion (Misc queries) 7 July 26th 09 10:02 PM
Highlight more than one entire row when cells = TRUE Mally Excel Discussion (Misc queries) 5 July 15th 08 09:31 AM
Can I highlight misspelt words in cells when I use the spell check Black Project Excel Discussion (Misc queries) 4 May 15th 07 09:05 AM
How do I make a checked check box = 1 instead of True? crimsonkng Excel Worksheet Functions 5 December 5th 06 07:18 PM


All times are GMT +1. The time now is 07:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"