Possible to change font color for only changes to a workbook?

D

Debbie

In addition to the track changes feature, I would like to make any changes to
the cell a different color (red). Is it possible to change the font setting
for just changes?

Thanks!!
 
J

JLatham

Yes it is, but I'm not sure how useful it would be for you.

At the simplest level, this code would make font in any cell altered turn red:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
On Error Resume Next ' in case cell is locked & protected
Target.Font.ColorIndex = 3 ' change to red
If Err <> 0 Then
Err.Clear
End If
On Error GoTo 0
End Sub

To try it out, open a workbook and right-click on the Excel icon immediately
to the left of the word File in the main menu and choose [View Code], then
copy the code above and paste it into the code module presented to you.
Close the VB Editor and give it a go.

Of course you're going to want a way to reset font colors back to whatever
as a 'baseline' for sending the workbook out for use. And if you've used
multiple font colors on a sheet, that becomes rather tedious to reset to
original color if they got changed.

But changing the font color only tells you that something changed, not who
changed or when.
 

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