Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi,
The change event macro below is not working. Is there a mistake in the formula that I've missed? Thanks! __________________________________________________ __ Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Dim vLetter As String Dim vColor As Integer Dim cRange As Range Dim cell As Range Set cRange = Intersect(Range("B3:X28"), Range(Target(1).Address)) If cRange Is Nothing Then Exit Sub For Each cell In Target vLetter = UCase(Left(cell.Value & " ", 1)) vColor = 0 Select Case vLetter Case "V" vColor = 3 Case "S" vColor = 3 Case "E" vColor = 3 Case "P" vColor = 3 Case "T" vColor = 3 End Select Application.EnableEvents = False cell.Text.ColorIndex = vColor Application.EnableEvents = True Application.Calculate Next cell End Sub -- Message posted via http://www.officekb.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autofitting a row | Excel Discussion (Misc queries) | |||
Sort or Filter option? | Excel Worksheet Functions | |||
Converting Numbers to Text properly | Excel Discussion (Misc queries) | |||
Why is my text changing to pound signs? | Excel Discussion (Misc queries) | |||
Read Text File into Excel Using VBA | Excel Discussion (Misc queries) |