#1
|
|||
|
|||
Control Buttons, Macros, Fill Colors
I don't even know if this is possible so I thought I'd ask this group. What I am creating is a Action item List and I want to be able to color code those items that are complete. So basically, I have a control button inserted that I'd like to fill the cells in a particular row with a particular color when the button is depressed. I know nothing about macros so I'm stuck (assuming this can even be done this way). If anyone can help me with this, or show me a different way to get the results I'm looking for, it would be much appreciated. |
#2
|
|||
|
|||
.
This code is pasted in the Sheet Level module : Code:
Option Explicit Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'If the target cell is clear If Target.Interior.ColorIndex = xlNone Then 'Then change the background to the specified color Target.Interior.ColorIndex = 6 '6 is yellow 'But if the target cell is already the specified color ElseIf Target.Interior.ColorIndex = 6 Then 'Then change the background to the specified color 'Target.Interior.ColorIndex = 3 '3 is red 'But if the target cell is already the specified color 'ElseIf Target.Interior.ColorIndex = 3 Then 'Then clear the background color Target.Interior.ColorIndex = xlNone End If End Sub |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Font and Fill Colors invisible in Excel 2007 | tiger hunt | Excel | 0 | 02-28-2017 02:19 AM |
Contract Template - Employment fill-in and macros | tina_mariee | Word | 1 | 02-11-2017 04:56 PM |
Visual basic and Macros buttons are gray | atom3 | PowerPoint | 3 | 03-04-2016 11:46 AM |
Need to put two highlight buttons on toolbar in different colors | davidmrt | Word | 6 | 12-11-2011 05:54 AM |
Create a toolbar of fill colors | itgoeson | PowerPoint | 0 | 08-24-2010 01:26 PM |