Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-06-2017, 09:48 AM
casualuser casualuser is offline Control Buttons, Macros, Fill Colors Windows XP Control Buttons, Macros, Fill Colors Office 2013
Novice
Control Buttons, Macros, Fill Colors
 
Join Date: Nov 2017
Posts: 1
casualuser is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 11-06-2017, 05:37 PM
Logit Logit is offline Control Buttons, Macros, Fill Colors Windows 10 Control Buttons, Macros, Fill Colors Office 2007
Expert
 
Join Date: Jan 2017
Posts: 533
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

.
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
Attached Files
File Type: xlsm Color Click Cell.xlsm (12.9 KB, 11 views)
Reply With Quote
Reply



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
Control Buttons, Macros, Fill Colors Contract Template - Employment fill-in and macros tina_mariee Word 1 02-11-2017 04:56 PM
Control Buttons, Macros, Fill Colors 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

Other Forums: Access Forums

All times are GMT -7. The time now is 03:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft