Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
DanC
 
Posts: n/a
Default Allow users to change the color of the comment indicator color so.

I have some reporting Excel files that color numerical cells against
established criteria. If I have comments in the cell, and the cell becomes
red, I need the comment indicator to turn white or allow me to change the
color to one that is not used for evaluations.
  #2   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

There's sample code here to add coloured shapes over the comment markers:

http://www.contextures.com/xlcomments03.html#Indicator

You could modify it to add a marker to red cells only, e.g.:

'=================================
Sub CoverCommentIndicatorRedCells()
Dim ws As Worksheet
Dim cmt As Comment
Dim rngCmt As Range
Dim shpCmt As Shape
Dim shpW As Double 'shape width
Dim shpH As Double 'shape height

Set ws = ActiveSheet
shpW = 6
shpH = 4

For Each cmt In ws.Comments
Set rngCmt = cmt.Parent
If cmt.Parent.Interior.ColorIndex = 3 Then
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 'yellow marker
.Fill.Visible = msoTrue
.Fill.Solid
.Line.Visible = msoFalse
End With
End If
Next cmt

End Sub
'==================================


DanC wrote:
I have some reporting Excel files that color numerical cells against
established criteria. If I have comments in the cell, and the cell becomes
red, I need the comment indicator to turn white or allow me to change the
color to one that is not used for evaluations.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I turn of zooming so that users can't change size of work. cwwolfdog Excel Discussion (Misc queries) 2 February 10th 05 02:53 PM
how to change default comment format in excel (2000) superiorparties Excel Discussion (Misc queries) 1 February 3rd 05 12:43 AM
Where to stick macro to change default comment font? [email protected] Excel Discussion (Misc queries) 1 January 1st 05 12:57 AM
change the default word in the insert comment option in excel excel Setting up and Configuration of Excel 1 December 28th 04 02:50 PM
change the default word in the insert comment option in excel excel Setting up and Configuration of Excel 2 December 24th 04 12:51 PM


All times are GMT +1. The time now is 09:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"