I'm trying to prevent people from modifying (most) of my spreadsheet while still alowing them to use the sort function of the AutoFilter. What I've done so far is used the Worksheet_Change event and Application.Undo to automatically undo any values entered into cells that I don't want to be modified. This works great, except that it can't detect changes in formatting. Does anyone know of a means to trigger an event when the format (text/background color) of a cell is changed?

I suppose you could try something at the SelectionChange event. If someone changes the formatting of a cell and then moves to a different cell that event will be called.

Whatever code you have in that area will constantly be called, so it would be a good idea to preface whatever you do with some quick checks to make sure the cells are in a certain range, have data, etc. Your sheet could get pretty sluggish otherwise as users move from cell to cell.

Thanks for the help! What I ended up doing is preventing users from saving the sheet; anything written in the "Comments" column triggers the Worksheet Change event to save a time stamped version in another sheet. The time stamped comments are then transferred over once the original sheet is reopened.
–
The_ThirdAug 11 '10 at 13:45

Not sure why this was downvoted: it seems to me that 1) this event is triggered just in time to detect changes, and 2) that it reverts both the value and color (I am not too sure if this actually happens above?). Next, I assume the author is right that some other formatting things besides color could be reverted too?
–
ArjanFeb 15 '14 at 11:43

Hello, sorry for my english iam not really good in, but i found little bug when iam testing. With very big range its very slow. For my use its irrelevant, but it should be faster if you leave the loops, and let comparing just first left cell. But, sure you can use to revert any changes.
–
nonUserFeb 15 '14 at 17:22