Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Watch not working for action on other cells
This code was working at one point, but now it's not:
If Target.Address = "$B$6" Then Application.EnableEvents = False Select Case Target.Value Case "Project-Cost Sizing" Range("B16:C19").Interior.ColorIndex = 1 Range("B21:C21").Interior.ColorIndex = 1 Range("B33:C33").Interior.ColorIndex = 1 Case "Project-Cost & Go" Range("B16:C17").Interior.ColorIndex = 1 Range("B18:C19").Interior.ColorIndex = 1 Range("B20:C20").Interior.ColorIndex = 1 Range("B21:C21").Interior.ColorIndex = 1 Range("B33:C33").Interior.ColorIndex = 1 Case "Consulting-M&A" Range("B16:C17").Interior.ColorIndex = 1 Range("B18:C19").Interior.ColorIndex = 1 Range("B20:C20").Interior.ColorIndex = 1 Range("B21:C21").Interior.ColorIndex = 1 Range("B33:C33").Interior.ColorIndex = 1 Case "Consulting-DEFINE" Range("B16:C19").Interior.ColorIndex = 0 Range("B33:C33").Interior.ColorIndex = 0 Case "[select from list]" Range("B16:C19").Interior.ColorIndex = 1 Range("B21:C21").Interior.ColorIndex = 1 Range("B33:C33").Interior.ColorIndex = 1 End Select End If |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Watch not working for action on other cells
I s this code in a work_sheet change function? I think the events wre turned
off. Run this code to fix the problem. sub turnOnEvents() Application.EnableEvents = True end sub "S Himmelrich" wrote: This code was working at one point, but now it's not: If Target.Address = "$B$6" Then Application.EnableEvents = False Select Case Target.Value Case "Project-Cost Sizing" Range("B16:C19").Interior.ColorIndex = 1 Range("B21:C21").Interior.ColorIndex = 1 Range("B33:C33").Interior.ColorIndex = 1 Case "Project-Cost & Go" Range("B16:C17").Interior.ColorIndex = 1 Range("B18:C19").Interior.ColorIndex = 1 Range("B20:C20").Interior.ColorIndex = 1 Range("B21:C21").Interior.ColorIndex = 1 Range("B33:C33").Interior.ColorIndex = 1 Case "Consulting-M&A" Range("B16:C17").Interior.ColorIndex = 1 Range("B18:C19").Interior.ColorIndex = 1 Range("B20:C20").Interior.ColorIndex = 1 Range("B21:C21").Interior.ColorIndex = 1 Range("B33:C33").Interior.ColorIndex = 1 Case "Consulting-DEFINE" Range("B16:C19").Interior.ColorIndex = 0 Range("B33:C33").Interior.ColorIndex = 0 Case "[select from list]" Range("B16:C19").Interior.ColorIndex = 1 Range("B21:C21").Interior.ColorIndex = 1 Range("B33:C33").Interior.ColorIndex = 1 End Select End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Watch Window not working in 2007 | Setting up and Configuration of Excel | |||
Watch not working | Excel Programming | |||
Watch out for ByRef parameters not working! | Excel Programming | |||
Rewrite cut action not working. | Excel Programming | |||
Custom Toolbar: ListBox on.action not working | Excel Programming |