The way to find out about our place in the universe is by examining the universe and by examining ourselves - without preconceptions, with as unbiased a mind as we can muster.
I have this code running on my work sheet. What id like to do is place his in a module, however I dont know how to pass the (ByVal Target As Range) to the module. Any help is greatly appreciated. Also by sheer accident I figured out how to force CAPS to my range of cells containing validations.Doing this prevented me from having to program lowers into my case statement and also makes the selections appear more uniform.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("E:AN")) Is Nothing Then
Target(1).Value = UCase(Target(1).Value) End If
Set I = Intersect(Target, Range("C6:AH188")) If Not I Is Nothing Then Select Case Target Case "LV": NewColor = 33 Case "TD": NewColor = 38 Case "MED": NewColor = 18 Case "SL": NewColor = 16 Case "RC": NewColor = 43 Case "LC": NewColor = 14 Case "GR": NewColor = 3 Case "BU": NewColor = 53 Case "WD": NewColor = 42 Case "HR": NewColor = 15 Case "DD": NewColor = 40 Case "WC": NewColor = 50 End Select Target.Interior.ColorIndex = NewColor
Select Case Target Case "BU": TXColor = 2 Case "MED": TXColor = 2 End Select Target.Font.ColorIndex = TXColor
End If Application.EnableEvents = True End Sub
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Excel Forum.