LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Focus problem??

I'm building a simple risk log and would appreciate some help.

Users select one of 5 probability values (rare, unlikely, ....almost
certain) in col N
Users select one of 5 impact value (insignificant, minor,
major...catastrophic!) in Col N+1. Each of these is restricted to selecting
from a simple validation list.

The value in Column N+2 (the risk rating) is then generated from the
specified combination of probability and impact and referring to 5X5 matrix
(I use the MATCH and INDEX functions to achieve this. No problem so far,
that works and generates a Risk value from LOW through to EXTREME.

I then try and use the code below to generate a fill/background color to
match the risk rating in the cell (getting around the conditional formatting
limit of only 3 possible values in Excel 2003)

This code works fine if I simply type in the Risk Rating value but not if I
generate it as above. It's as if the cell is not registering the change of
value. Lack of focus??

Any assistance most appreciated.


Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("L16:L56")) Is Nothing Then
Select Case Target
Case "Low"
icolor = 3
Case "Moderate"
icolor = 46
Case "High"
icolor = 6
Case "Very High"
icolor = 43
Case Else
'Whatever
End Select

Target.Interior.ColorIndex = icolor
End If
End Sub




 
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
cmdbarmenu focus problem pjbur2005 via OfficeKB.com Excel Worksheet Functions 2 January 28th 07 02:44 AM
Complex focus problem RB Smissaert Excel Programming 7 August 28th 05 02:32 PM
Focus problem Jos Vens Excel Programming 0 May 27th 04 10:29 PM
weird focus problem Tom Ogilvy Excel Programming 0 August 8th 03 04:01 PM
weird focus problem Ron de Bruin Excel Programming 0 August 8th 03 03:54 PM


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

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

About Us

"It's about Microsoft Excel"