Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Watch Window not working in 2007 campingshadow Setting up and Configuration of Excel 0 August 12th 08 05:16 PM
Watch not working S Himmelrich Excel Programming 1 August 7th 08 03:07 AM
Watch out for ByRef parameters not working! tbone[_2_] Excel Programming 2 June 1st 07 04:52 AM
Rewrite cut action not working. KS[_2_] Excel Programming 2 November 20th 06 05:37 PM
Custom Toolbar: ListBox on.action not working Alison[_3_] Excel Programming 3 August 11th 04 04:30 AM


All times are GMT +1. The time now is 02:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"