How so I make a "Worksheet_Change Event" to show cell changes in Excel?

  • Thread starter Thread starter susiecmore
  • Start date Start date
S

susiecmore

How do I make all the cells on a worksheet change color when a change
has been made to any of the cells?

ie. "use Worksheet_Change event" then. If any change at all is made to
a cell I need o see the cell colored to identify a change has been
made.


Can someone explain exactly how I would make a "Worksheet_Change
event" to make this happen on my spreadsheet?
 
Look at Chip Pearson's site to get an overview of events:

http://www.cpearson.com/excel/events.htm

then you would right click on the sheet tab and select view code. Then in
the left dropdown at the top of the resulting module, select Worksheet and in
the right dropdown select CHANGE (not SELECTIONCHANGE)

You should get a declaration like this:

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

the target argument will hold a range reference to the cell that was
edited/changed and triggered the event


Private Sub Worksheet_Change(ByVal Target As Range)

End Sub


So you would use that to take action. for example:

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 3
End Sub
 

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

Back
Top