conditional formatting

S

Steve_n_KC

Courtesy of Contextures I have the code listed below for the variable grin
Smiley Face. Also with Contextures help I have changed my comment boxes to
Smiley Faces. If it is even possible, could someone help me modify the code
below to:

1. Have the Comment Box smileys independently change their grins according
to the value in the cell that they are attached to?

2. Possibly also change the fill color for the Smiley according to the same
value???

Are either of these possible?

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo errHandler

If Target.Address = "$H$3" Then
Application.EnableEvents = False
' min is 0.7181
' max is 0.8111
Select Case Target.Value
Case 0
Shapes("HappyFace").Adjustments.Item(1) = 0.7
Case 50
Shapes("HappyFace").Adjustments.Item(1) = 0.767
Case 100
Shapes("HappyFace").Adjustments.Item(1) = 0.9
Case Else
Shapes("HappyFace").Adjustments.Item(1) _
= 0.7181 + Target.Value / 1000
End Select
End If

exitHandler:
Application.EnableEvents = True
Exit Sub

errHandler:
MsgBox Err.Number & " " & Err.Description
GoTo exitHandler
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top