View Single Post
 
Old 05-19-2012, 03:48 AM
LongTTH LongTTH is offline Windows XP Office 2010 (Version 14.0)
Novice
 
Join Date: Dec 2010
Posts: 3
LongTTH is on a distinguished road
Default Detect a cell has un-approved change or not?

Hi all,
I'm finding some way to do "highlight anything change with red color"
my thought is :
Code:
loop through all cell in this active sheet
  if (cell has unapproved change) then
      set text color = red
  else 
      set text color = normal;
next cell
My current code is :
Code:
Sub HighlightCellWithUnApproveddChanges()
    Dim rwIndex As Integer
    Dim colIndex As Integer
    For rwIndex = 1 To 10
            For colIndex = 1 To 5
                If Cells(rwIndex, colIndex).XlCellChangeState = XlCellChangeState.xlCellChanged Then _
                    Cells(rwIndex, colIndex).Interior.ColorIndex = 36
            Next colIndex
    Next rwIndex
End Sub
any help are appreciated!
thanks
Reply With Quote