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?
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?
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" <[email protected]> wrote in message
news:[email protected]...
> 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?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks