Results 1 to 5 of 5

Change Colour of AutoShape trigger cell problem.

Threaded View

  1. #1
    Forum Contributor
    Join Date
    03-02-2010
    Location
    Northumberland, England
    MS-Off Ver
    Excel 2016
    Posts
    143

    Change Colour of AutoShape trigger cell problem.

    Hi Guys and Girls

    Im really needing help here. Ive some code that changes my AutoShape button colour. It works fine when I enter a value into the trigger cell and press enter.

    Ive had to adapt my spreadsheet slightly and the triggercell now has an IF Statement to give me either Yes No or Blank. Now the code wont work unless i manually click into the trigger cell and press enter.

    Id like this to run automatically as the IF Statement changes.

    Here is my code. (the triggercell is on a separate worksheet sheet from the Autoshape buttons.
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Dim myTriggerCell As Range
    Set myTriggerCell = Sheets("WC").Range("C152")
    If Not Application.Intersect(myTriggerCell, Target) Is Nothing Then
    Select Case myTriggerCell.Value
    Case "Yes": Sheets("Dashboard").Shapes("Rounded Rectangle 2").Fill.ForeColor.RGB = RGB(51, 204, 51)
    Case "No": Sheets("Dashboard").Shapes("Rounded Rectangle 2").Fill.ForeColor.RGB = RGB(247, 150, 70)
    Case "": Sheets("Dashboard").Shapes("Rounded Rectangle 2").Fill.ForeColor.RGB = RGB(79, 129, 189)
    For Each c In Sheets("WC").Range("F6:F39")
    If c.Value >= DateTime.Date Then
    Sheets("Dashboard").Shapes("Rounded Rectangle 2").Fill.ForeColor.RGB = RGB(255, 0, 0)
    Call Change
    End If
    Next
    End Select
    End If
    End Sub
    Can anyone offer a solution.

    Thanks
    SB
    Last edited by singerbatfink; 02-08-2016 at 03:28 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Change autoshape color based on a cell value that contains a formula
    By Myexceltuts in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-09-2014, 10:25 AM
  2. [SOLVED] Looking to change autoshape and other cell colour automatically dependant on values.
    By muckleshed in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-16-2013, 11:07 AM
  3. VBA AutoShape Color Change Script for Formula Cell
    By Sean Ross in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-29-2013, 12:16 PM
  4. Replies: 2
    Last Post: 06-04-2012, 06:57 AM
  5. Change Font Colour in Autoshape
    By Tellm in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-18-2010, 12:27 AM
  6. Trigger a macro based on cell colour change
    By hermithead in forum Excel General
    Replies: 1
    Last Post: 02-23-2010, 09:57 AM
  7. change autoshape by condition from a cell value
    By emil.roman@gmail.com in forum Excel General
    Replies: 7
    Last Post: 04-26-2006, 08:50 PM
  8. [SOLVED] Cell value change to trigger macro (worksheet change event?)
    By Neil Goldwasser in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2006, 10:00 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1