Good morning!
I've been searching for a way to change the color of specific Note Indicators. I found this solution searching Microsoft's support site. It works fine but it changes every Note Indicator on the sheet.
I'm trying to only change the color of the Note Indicator on the selected cell. Here's the code:
I've been searching for a way to change the color of specific Note Indicators. I found this solution searching Microsoft's support site. It works fine but it changes every Note Indicator on the sheet.
I'm trying to only change the color of the Note Indicator on the selected cell. Here's the code:
VBA Code:
Sub ReformatNoteIndicator()
Dim ws As Worksheet
Dim cmt As Comment
Dim rngCmt As Range
Dim shpCmt As Shape
Dim shpW As Double
Dim shpH As Double
Set ws = ActiveSheet
shpW = 5
shpH = 5
For Each cmt In ws.Comments
Set rngCmt = cmt.Parent
With rngCmt
Set shpCmt = ws.Shapes.AddShape(msoShapeRightTriangle, rngCmt.Offset(0, 1).Left - shpW, .Top, shpW, shpH)
End With
With shpCmt
.Flip msoFlipVertical
.Flip msoFlipHorizontal
.Fill.ForeColor.SchemeColor = 12
.Fill.Visible = msoTrue
.Fill.Solid
.Line.Visible = msoFalse
End With
Next cmt
End Sub