S
Simon Lloyd
Hi all!,
I have some worksheet code on each sheet to perform a formattin
function in a certain range, i also have conditional formating set u
for that range to colour text, the range is formatted "wingdings" an
formatted custom I;I;I; so that any letter that is introduced is turne
in to a spot the conditional formatting colours the spot.....my proble
is this....when i run the macro it does not formatt the cell a colou
it does not enter the text input in to the input box ( the input bo
requires number first and then a letter, the code works fine on a tes
book but not when introduced to the sheet that has conditiona
formatting) in the cell so leaving the cell blank can yo help?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim val
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("I3:AG641")) Is Nothing Then
val = InputBox("Enter Skill Level" & Chr(13) & "1= In Training"
Chr(13) & "2= Trained" & Chr(13) & "3= Can Train Others" & Chr(13)
"4= Delete Colour and Entry" & Chr(13) & "After number entry enter an
letter, For option 4 do not enter a letter!", "Skills Breakdown an
Competencies Entry", "")
'Range("A" & ActiveCell.Row).Select
With Target
Select Case Left(val, 1)
Case 1:
.Interior.ColorIndex = 48
.Value = Mid(val, 2, 99)
Case 2:
.Interior.ColorIndex = 41
.Value = Mid(val, 2, 99)
Case 3:
.Interior.ColorIndex = 43
.Value = Mid(val, 2, 99)
Case 4:
.Interior.ColorIndex = xlNone
.Value = Mid(val, 2, 99)
Case Else: MsgBox "Invalid Entry Try Again!"
'Range("A" & ActiveCell.Row).Select
End Select
End With
End If
ws_exit:
Application.EnableEvents = True
End Su
I have some worksheet code on each sheet to perform a formattin
function in a certain range, i also have conditional formating set u
for that range to colour text, the range is formatted "wingdings" an
formatted custom I;I;I; so that any letter that is introduced is turne
in to a spot the conditional formatting colours the spot.....my proble
is this....when i run the macro it does not formatt the cell a colou
it does not enter the text input in to the input box ( the input bo
requires number first and then a letter, the code works fine on a tes
book but not when introduced to the sheet that has conditiona
formatting) in the cell so leaving the cell blank can yo help?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim val
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("I3:AG641")) Is Nothing Then
val = InputBox("Enter Skill Level" & Chr(13) & "1= In Training"
Chr(13) & "2= Trained" & Chr(13) & "3= Can Train Others" & Chr(13)
"4= Delete Colour and Entry" & Chr(13) & "After number entry enter an
letter, For option 4 do not enter a letter!", "Skills Breakdown an
Competencies Entry", "")
'Range("A" & ActiveCell.Row).Select
With Target
Select Case Left(val, 1)
Case 1:
.Interior.ColorIndex = 48
.Value = Mid(val, 2, 99)
Case 2:
.Interior.ColorIndex = 41
.Value = Mid(val, 2, 99)
Case 3:
.Interior.ColorIndex = 43
.Value = Mid(val, 2, 99)
Case 4:
.Interior.ColorIndex = xlNone
.Value = Mid(val, 2, 99)
Case Else: MsgBox "Invalid Entry Try Again!"
'Range("A" & ActiveCell.Row).Select
End Select
End With
End If
ws_exit:
Application.EnableEvents = True
End Su